public SlugebZapiskaViewModal(string pnom_sz, string pser_nom) { save_row = new Row_in_plan_rabot(); save_row.Nom_sz = pnom_sz; save_row.Ser_nom = pser_nom; text_for_filter_ser_nom = pser_nom; izgot = new ObservableCollection <SlugebZapiskaIzgotViewModal>(); izgot.Add(new SlugebZapiskaIzgotViewModal()); remont = new ObservableCollection <SlugebZapiskaRemontViewModal>(); remont.Add(new SlugebZapiskaRemontViewModal()); priobr = new ObservableCollection <SlugebZapiskaPriobrViewModal>(); priobr.Add(new SlugebZapiskaPriobrViewModal()); stor_rem = new ObservableCollection <SlugebZapiskaStorRemViewModal>(); stor_rem.Add(new SlugebZapiskaStorRemViewModal()); DefaultAction(); }
public RowPlanViewModal(Row_in_plan_rabot prow) { row = prow; }
public SlugebZapiskaViewModal(string pnom_sz) { save_row = (Server.GetServer.DataBase("uit").Table("select * from rz_plan_rabot where nom_sz = '" + pnom_sz + "'").LoadFromServer() as List <Row_in_plan_rabot>)[0]; id = MainOUP.GetIndexOfKartDefect(pnom_sz); text_for_filter_ser_nom = save_row.Ser_nom; text_for_filter_kontract = save_row.Nom_kont; izgot = new ObservableCollection <SlugebZapiskaIzgotViewModal>(); ObservableCollection <RowDefectViewModal> tmp_list = Converter.ToViewModal(Server.GetServer .DataBase("uit").Table("select * from rz_kart_defect where par = " + id + " and spos_ustr = " + References.GetReferences.GetId("rz_spos_ustr", "Изготовить")) .LoadFromServer() as List <Row_in_kart_defect>); foreach (RowDefectViewModal row in tmp_list) { izgot.Add(new SlugebZapiskaIzgotViewModal(row)); } if (izgot.Count == 0) { izgot.Add(new SlugebZapiskaIzgotViewModal(id)); } remont = new ObservableCollection <SlugebZapiskaRemontViewModal>(); tmp_list = Converter.ToViewModal(Server.GetServer.DataBase("uit") .Table("select * from rz_kart_defect where par = " + id + " and spos_ustr = " + References.GetReferences.GetId("rz_spos_ustr", "Дефектация")) .LoadFromServer() as List <Row_in_kart_defect>); foreach (RowDefectViewModal row in tmp_list) { remont.Add(new SlugebZapiskaRemontViewModal(row)); } if (remont.Count == 0) { remont.Add(new SlugebZapiskaRemontViewModal(id)); } priobr = new ObservableCollection <SlugebZapiskaPriobrViewModal>(); tmp_list = Converter.ToViewModal(Server.GetServer.DataBase("uit") .Table("select * from rz_kart_defect where par = " + id + " and spos_ustr = " + References.GetReferences.GetId("rz_spos_ustr", "Приобрести")) .LoadFromServer() as List <Row_in_kart_defect>); foreach (RowDefectViewModal row in tmp_list) { priobr.Add(new SlugebZapiskaPriobrViewModal(row)); } if (priobr.Count == 0) { priobr.Add(new SlugebZapiskaPriobrViewModal(id)); } stor_rem = new ObservableCollection <SlugebZapiskaStorRemViewModal>(); tmp_list = Converter.ToViewModal(Server.GetServer.DataBase("uit") .Table("select * from rz_kart_defect where par = " + id + " and spos_ustr = " + References.GetReferences.GetId("rz_spos_ustr", "Сторонний ремонт")) .LoadFromServer() as List <Row_in_kart_defect>); foreach (RowDefectViewModal row in tmp_list) { stor_rem.Add(new SlugebZapiskaStorRemViewModal(row)); } if (stor_rem.Count == 0) { stor_rem.Add(new SlugebZapiskaStorRemViewModal(id)); } DefaultAction(); }
public RowPlanViewModal() { row = new Row_in_plan_rabot(); }