You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
3.5 KiB
112 lines
3.5 KiB
2 months ago
|
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 frmProdnoRule2Detail : Stone.WinModule.BasicData.frmBaseMainDetail
|
||
|
{
|
||
|
public frmProdnoRule2Detail()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
|
||
|
//DataTable dtCarType = new DataTable();
|
||
|
//dtCarType.Columns.Add("Code");
|
||
|
|
||
|
//DataRow drCarType = null;
|
||
|
|
||
|
//drCarType = dtCarType.NewRow();
|
||
|
//drCarType["Code"] = "177";
|
||
|
//dtCarType.Rows.Add(drCarType);
|
||
|
|
||
|
//drCarType = dtCarType.NewRow();
|
||
|
//drCarType["Code"] = "247";
|
||
|
//dtCarType.Rows.Add(drCarType);
|
||
|
|
||
|
//drCarType = dtCarType.NewRow();
|
||
|
//drCarType["Code"] = "H247";
|
||
|
//dtCarType.Rows.Add(drCarType);
|
||
|
|
||
|
//this.txtCartype.DataSource = dtCarType;
|
||
|
//this.txtCartype.DisplayMember = "Code";
|
||
|
//this.txtCartype.ValueMember = "Code";
|
||
|
|
||
|
this.txtCartype.DataSource = new Entity_t_CarType().GetData().Tables[0];
|
||
|
this.txtCartype.ValueMember = "Code";
|
||
|
this.txtCartype.DisplayMember = "Code";
|
||
|
|
||
|
}
|
||
|
|
||
|
private void frmProdnoRule2Detail_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public override bool GetData()
|
||
|
{
|
||
|
if (!MyValidator.IsEmpty(this.txtCode, "")) return false;
|
||
|
if (!MyValidator.IsEmpty(this.txtValue, "")) return false;
|
||
|
if (!MyValidator.IsEmpty(this.txtSort, "")) return false;
|
||
|
if (!MyValidator.IsNumeric(this.txtSort, "")) return false;
|
||
|
|
||
|
|
||
|
base.GetData();
|
||
|
|
||
|
|
||
|
drData["cartype"] = MyStrings.GetString(this.txtCartype.SelectedValue.ToString());
|
||
|
drData["ruletype"] = MyStrings.GetString(this.txtRuletype.Text.Trim());
|
||
|
drData["FL"] = this.txtFL.Checked;
|
||
|
drData["FR"] = this.txtFR.Checked;
|
||
|
drData["RL"] = this.txtRL.Checked;
|
||
|
drData["RR"] = this.txtRR.Checked;
|
||
|
drData["code"] = MyStrings.GetString(this.txtCode.Text.Trim());
|
||
|
drData["value"] = MyStrings.GetString(this.txtValue.Text.Trim());
|
||
|
drData["groups"] = MyStrings.GetString(this.txtGroups.Text.Trim());
|
||
|
drData["sort"] = MyStrings.GetString(this.txtSort.Text.Trim());
|
||
|
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public override bool SetData()
|
||
|
{
|
||
|
|
||
|
if (base.SetData())
|
||
|
{
|
||
|
|
||
|
this.txtCartype.SelectedValue = drData["cartype"].ToString();
|
||
|
this.txtRuletype.Text = drData["ruletype"].ToString();
|
||
|
this.txtFL.Checked = Convert.ToBoolean(drData["FL"]);
|
||
|
this.txtFR.Checked = Convert.ToBoolean(drData["FR"]);
|
||
|
this.txtRL.Checked = Convert.ToBoolean(drData["RL"]);
|
||
|
this.txtRR.Checked = Convert.ToBoolean(drData["RR"]);
|
||
|
this.txtCode.Text = drData["code"].ToString();
|
||
|
this.txtValue.Text = drData["value"].ToString();
|
||
|
this.txtGroups.Text = drData["groups"].ToString();
|
||
|
this.txtSort.Text = drData["sort"].ToString();
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
public override void Clear()
|
||
|
{
|
||
|
base.Clear();
|
||
|
|
||
|
this.txtCode.Text = "";
|
||
|
this.txtValue.Text = "";
|
||
|
this.txtSort.Text = "";
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|