using Stone.Common; using Stone.Entity; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Stone.WinModule.BasicData { public partial class frmTTZ_RuleDetail : Stone.WinModule.BasicData.frmBaseMainDetail { public frmTTZ_RuleDetail() { InitializeComponent(); this.txtCartype.DataSource = new Entity_t_CarType().GetData().Tables[0]; this.txtCartype.ValueMember = "Code"; this.txtCartype.DisplayMember = "Code"; } private void frmTTZ_RuleDetail_Load(object sender, EventArgs e) { } public override bool GetData() { if (!MyValidator.IsEmpty(this.cob_Position, "")) return false; if (!MyValidator.IsEmpty(this.txt_code1, "")) return false; if (!MyValidator.IsEmpty(this.txt_code2, "")) return false; if (!MyValidator.IsEmpty(this.txtValue, "")) return false; base.GetData(); drData["cartype"] = MyStrings.GetString(this.txtCartype.SelectedValue.ToString()); drData["position"] = this.cob_Position.Text.ToString(); drData["code"] = MyStrings.GetString(this.txt_code1.Text.Trim()); drData["code2"] = MyStrings.GetString(this.txt_code2.Text.Trim()); drData["value"] = MyStrings.GetString(this.txtValue.Text.Trim()); cob_Position.SelectedIndex = 1; return true; } public override bool SetData() { if (base.SetData()) { this.txtCartype.SelectedValue = drData["cartype"].ToString(); this.cob_Position.Text= drData["position"].ToString(); this.txt_code1.Text = drData["code"].ToString(); this.txt_code2.Text = drData["code2"].ToString(); this.txtValue.Text = drData["value"].ToString(); } return false; } public override void Clear() { base.Clear(); this.txt_code1.Text = ""; this.txt_code2.Text = ""; this.txtValue.Text = ""; } } }