| | |
| | | VOLContext context = new VOLContext(); |
| | | Idt_plcinfodetailRepository repository = new dt_plcinfodetailRepository(context); |
| | | List<dt_plcinfodetail> plcinfodetail = new List<dt_plcinfodetail>(); |
| | | string name = "VK5"; |
| | | for (int i = 1; i <= 2; i++) |
| | | string name = "Pipeline"; |
| | | for (int i = 1; i <= 3; i++) |
| | | { |
| | | dt_plcinfodetail dt_Plcinfodetail1 = new dt_plcinfodetail() |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (0 + (i - 1) * 144).ToString(), |
| | | plcdetail_valtype = "byte", |
| | | plcdetail_name = "oi_on", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "ç³è¯·", |
| | | plcdetail_db = "DB29", |
| | | plcdetail_value = (21 + (i - 1) * 80).ToString(), |
| | | plcdetail_valtype = "string", |
| | | plcdetail_len = 20, |
| | | plcdetail_name = "R_Wheel_SN", |
| | | plcdetail_opratortype = "oiler", |
| | | plcdetail_remark = "Wheel_SN", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail1); |
| | |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (2 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "o_wp_id", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "车轮SNå·", |
| | | plcdetail_db = "DB29", |
| | | plcdetail_value = (22 + (i - 1) * 80).ToString(), |
| | | plcdetail_valtype = "int16", |
| | | plcdetail_name = "R_Wheel_Type", |
| | | plcdetail_opratortype = "oiler", |
| | | plcdetail_remark = "Wheel_Type", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail2); |
| | |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (24 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "i_job_id", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "å·¥åç¼å·", |
| | | plcdetail_db = "DB29", |
| | | plcdetail_value = (24 + (i - 1) * 80).ToString(), |
| | | plcdetail_valtype = "byte", |
| | | plcdetail_name = "R_Part_Status", |
| | | plcdetail_opratortype = "oiler", |
| | | plcdetail_remark = "Part_Status", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail3); |
| | |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (22 + (i - 1) * 144).ToString(), |
| | | plcdetail_db = "DB29", |
| | | plcdetail_value = (25 + (i - 1) * 80).ToString(), |
| | | plcdetail_valtype = "byte", |
| | | plcdetail_name = "i_status", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "ç¶æ", |
| | | plcdetail_name = "R_Part_Process", |
| | | plcdetail_opratortype = "oiler", |
| | | plcdetail_remark = "Part_Process", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail4); |
| | | dt_plcinfodetail dt_Plcinfodetail5 = new dt_plcinfodetail() |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (44 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "i_heat_id", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "ç代å·", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail5); |
| | | dt_plcinfodetail dt_Plcinfodetail6 = new dt_plcinfodetail() |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (64 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "i_billet_id", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "é¢å¯å·", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail6); |
| | | dt_plcinfodetail dt_Plcinfodetail7 = new dt_plcinfodetail() |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (84 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "i_batch_id", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "çå¤çæ¹æ¬¡", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail7); |
| | | dt_plcinfodetail dt_Plcinfodetail8 = new dt_plcinfodetail() |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (104 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "i_drawing_id", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "å¾å·", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail8); |
| | | dt_plcinfodetail dt_Plcinfodetail9 = new dt_plcinfodetail() |
| | | { |
| | | plcdetail_id = Guid.NewGuid(), |
| | | plcdetail_iotype = name, |
| | | plcdetail_db = "DB603", |
| | | plcdetail_value = (124 + (i - 1) * 144).ToString(), |
| | | plcdetail_len = 20, |
| | | plcdetail_valtype = "string", |
| | | plcdetail_name = "i_wheel_type", |
| | | plcdetail_opratortype = "labeller", |
| | | plcdetail_remark = "i_wheel_type", |
| | | plcdetail_number = i + "åå
", |
| | | }; |
| | | plcinfodetail.Add(dt_Plcinfodetail9); |
| | | } |
| | | repository.AddRange(plcinfodetail, true); |
| | | } |