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.

61 lines
1.6 KiB

1 week ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using Stone.Entity;
using Gm_WMS.DataAccess.DataService;
using Stone.Common;
namespace Stone.WinBiz.BasicData
{
public class F_BillNO : F_Base
{
public F_BillNO()
{
this.type = "BillNO";
this.name = "基础资料_ASN单流水管理";
this.entity = new Entity_t_BillNo();
}
public override void GetView(DataGridView dgv)
{
base.GetView(dgv);
dgv.Columns["type"].HeaderText = "配置项";
dgv.Columns["value"].HeaderText = "值";
}
public override void Checking(DataRow drData, bool isNew)
{
Entity_t_BillNo product = new Entity_t_BillNo();
if (product.GetData("", "type='" + drData["type"].ToString() + "'", "id asc").Tables[0].Rows.Count < 1)
{
//这NM的是个魔鬼~!
throw new Exception(drData["type"].ToString()+"不存在");
}
base.Checking(drData, isNew);
}
public override void InputData(DataSet dsData, LocalDBService db)
{
Entity_t_BillNo t_Input = new Entity_t_BillNo(db);
DataRow drInput = null;
foreach (DataRow drData in dsData.Tables[0].Rows)
{
drInput = t_Input.Table.NewRow();
drInput["type"] = drData["配置项"].ToString().Trim();
drInput["value"] = drData["值"].ToString().Trim();
t_Input.Add(drInput);
}
}
}
}