其他分享
首页 > 其他分享> > Linq在Lims系统中的用法

Linq在Lims系统中的用法

作者:互联网

FlowDataContext DCDC = new FlowDataContext();
Config ce = new Config();

try
{
ce = DCDC.Config.Single(p => p.ID.Equals(ConfigID.Text));
ce.FlowType = DDl1.SelectedValue;
ce.FlowName = TFlowName.Text;
ce.FlowCode=TFlowCode.Text;
ce.Remark = TRemark.Text;
DCDC.SubmitChanges();
Window1.Hidden = true;
BindGrid1();

}
catch
{

System.Guid guid = new Guid();
guid = Guid.NewGuid();

Config c = new Config();
c.ID = guid.ToString();
c.FlowName = TFlowName.Text;
c.FlowType = DDl1.SelectedValue;
c.FlowCode = TFlowCode.Text;
c.Remark = TRemark.Text;
DCDC.Config.InsertOnSubmit(c);
DCDC.SubmitChanges();
Window1.Hidden = true;
BindGrid1();

}

标签:Lims,DCDC,ce,用法,Linq,Text,new,guid,Config
来源: https://www.cnblogs.com/sanshengshitouhua/p/14486960.html