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.
80 lines
2.7 KiB
80 lines
2.7 KiB
3 weeks ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
|
||
|
using Stone.Entity;
|
||
|
using System.Data;
|
||
|
using Stone.Common;
|
||
|
|
||
|
namespace Stone.WinBiz.BasicData
|
||
|
{
|
||
|
public class F_Location : F_Base
|
||
|
{
|
||
|
public F_Location()
|
||
|
{
|
||
|
this.type = "Location";
|
||
|
this.name = "��������_��λ";
|
||
|
this.entity = new Entity_t_Location();
|
||
|
this.entityView = new Entity_t_Location();
|
||
|
}
|
||
|
|
||
|
|
||
|
public override void GetView(System.Windows.Forms.DataGridView dgv)
|
||
|
{
|
||
|
base.GetView(dgv);
|
||
|
dgv.Columns["Code"].HeaderText = "����";
|
||
|
dgv.Columns["Name"].HeaderText = "����";
|
||
|
dgv.Columns["COM"].HeaderText = "�˿�";
|
||
|
dgv.Columns["PartType"].HeaderText = "��������";
|
||
|
dgv.Columns["LightAddress"].HeaderText = "�Ƶ�ַ";
|
||
|
dgv.Columns["LocationType"].HeaderText = "�����";
|
||
|
dgv.Columns["Enabled"].HeaderText = "״̬";
|
||
|
dgv.Columns["AssyType"].HeaderText = "װ������";
|
||
|
dgv.Columns["PreAssyType"].HeaderText = "Ԥװ";
|
||
|
}
|
||
|
|
||
|
|
||
|
public override void InputData(DataSet dsInput, Gm_WMS.DataAccess.DataService.LocalDBService db)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
Entity_t_Location t_Input = new Entity_t_Location(db);
|
||
|
DataRow drInput = null;
|
||
|
|
||
|
foreach (DataRow drData in dsInput.Tables[0].Rows)
|
||
|
{
|
||
|
if (drData["����"].ToString().Trim() == "") continue;
|
||
|
|
||
|
drInput = t_Input.Table.NewRow();
|
||
|
drInput["Code"] = drData["����"].ToString().Trim();
|
||
|
drInput["Name"] = drData["����"].ToString().Trim();
|
||
|
drInput["COM"] = drData["�˿�"].ToString();
|
||
|
drInput["PartType"] = drData["��������"].ToString();
|
||
|
drInput["LightAddress"] = drData["�Ƶ�ַ"].ToString();
|
||
|
drInput["LocationType"] = drData["�����"].ToString();
|
||
|
drInput["Enabled"] = drData["״̬"].ToString();
|
||
|
drInput["AssyType"] = drData["װ������"].ToString();
|
||
|
drInput["PreAssyType"] = drData["Ԥװ"].ToString();
|
||
|
|
||
|
|
||
|
|
||
|
if (drInput["Code"].ToString().Trim() == "")
|
||
|
throw new Exception("���Ų���Ϊ��!");
|
||
|
|
||
|
if (new Entity_t_Location(db).GetData("", "Code='" + drInput["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count > 0)
|
||
|
throw new Exception("���� " + drInput["Code"].ToString() + " �Ѿ����ڣ�");
|
||
|
|
||
|
|
||
|
t_Input.Add(drInput);
|
||
|
}
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw new Exception(ex.Message);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|