using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using LYFZ.ComponentLibrary;
namespace LYFZ.Software.MainBusiness.Customers
{
public partial class FrmOrdersCustomerRecord : LYFZ.Software.UI.Customers.FrmOrdersCustomerRecord
{
///
/// 订单类型
///
public string DindanType;
public FrmOrdersCustomerRecord()
{
this.FormClosed += FrmOrdersCustomerRecord_FormClosed;
this.Shown += FrmOrdersCustomerRecord_Shown;
this.btnNO.Click += btnNO_Click;
this.btnKO.Click += btnKO_Click;
}
List Versions = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.GetBusinessTypeList();
void FrmOrdersCustomerRecord_Shown(object sender, EventArgs e)
{
radHS.Visible = false;
radET.Visible = false;
radXZ.Visible = false;
radHS.Tag = 0;
radET.Tag = 1;
radXZ.Tag = 2;
radFW.Tag = 3;
for (int i = 0; i < Versions.Count; i++)
{
LYFZ.Software.MainBusiness.EnumPermissions.BusinessType Version = Versions[i];
if (Version.ToString() == EnumPermissions.BusinessType.写真版.ToString())
{
radXZ.Visible = true;
}
if (Version.ToString() == EnumPermissions.BusinessType.婚纱版.ToString())
{
radHS.Visible = true;
}
if (Version.ToString() == EnumPermissions.BusinessType.儿童版.ToString())
{
radET.Visible = true;
}
}
if (radHS.Visible == false)
{ radET.Checked = true; }
else { radHS.Checked = true; }
}
void btnKO_Click(object sender, EventArgs e)
{
try
{
if (radHS.Checked == true) { DindanType = radHS.Tag.ToString(); }
if (radXZ.Checked == true) { DindanType = radXZ.Tag.ToString(); }
if (radET.Checked == true) { DindanType = radET.Tag.ToString(); }
if (radFW.Checked == true) { DindanType = radFW.Tag.ToString(); }
if (radHS.Checked == false && radXZ.Checked == false && radET.Checked == false && radFW.Checked == false)
{ MessageBoxCustom.Show("请选着添加类型!"); }
else
{
this.DialogResult = DialogResult.OK;
}
}
catch { }
}
void btnNO_Click(object sender, EventArgs e)
{ this.Close(); }
void FrmOrdersCustomerRecord_FormClosed(object sender, FormClosedEventArgs e)
{
}
}
}