北京安通林JIS系统
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.
 
 
 

102 lines
2.9 KiB

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 frmProdnoRule1Detail : Stone.WinModule.BasicData.frmBaseMainDetail
{
public frmProdnoRule1Detail()
{
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 frmProdnoRule1Detail_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["code"] = MyStrings.GetString(this.txtCode.Text.Trim());
drData["value"] = MyStrings.GetString(this.txtValue.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.txtCode.Text = drData["code"].ToString();
this.txtValue.Text = drData["value"].ToString();
this.txtSort.Text = drData["sort"].ToString();
}
return false;
}
public override void Clear()
{
base.Clear();
this.txtCode.Text = "";
this.txtValue.Text = "";
this.txtSort.Text = "";
}
}
}