public static Print_ItemsList GetData(string p_id) { Print_ItemsList list = new Print_ItemsList(); // List <Outwarditems> inv_item_list = COutwarditems_exten.FKId(p_id); for (int r = 0; r <= inv_item_list.Count - 1; r++) { Outwarditems row = new Outwarditems { Outwarditems_id = inv_item_list[r].Outwarditems_id, Outward_id = inv_item_list[r].Outward_id, Slno = (r + 1).ToString(), Style_id = Checks.RemoveEscape(inv_item_list[r].Style_id), Article_id = Checks.RemoveEscape(inv_item_list[r].Article_id), Product_id = Checks.RemoveEscape(inv_item_list[r].Product_id), Sizes_id = inv_item_list[r].Sizes_id, Colours_id = inv_item_list[r].Colours_id, Qty = inv_item_list[r].Qty }; list.Add(row); } return(list); }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = COutward_exten.PKId(pPkValue); list = COutwarditems_exten.FKId(pPkValue); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = COutward.GetNew; list = COutwarditems.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = COutward_exten.PKId(pPkValue); list = COutwarditems_exten.FKId(pPkValue); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = COutward_exten.PKId(pPkValue); list = COutwarditems_exten.FKId(pPkValue); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = COutward_exten.PKId(pPkValue); list = COutwarditems_exten.FKId(pPkValue); this.EnableControls(false); //print_panel.Show(); break; } LoadData(obj); Loaditems(list); }