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();

}

上一篇:【UEFI】---BIOS中对Guid的使用以及Lib函数的使用总结


下一篇:Asp.NetCoreWebApi - RESTful Api