private static Print_List GetData(string p_id) { Outward outward = COutward_exten.PKId(p_id); Print_List list = new Print_List(); Print_QuotationRow row = new Print_QuotationRow(); Company obj = CCompany_exten.PKId(Current.Company_id); row.COMPANY_NAME = obj.Display_name.ToUpper(); row.ADDRESS1 = obj.Street1 + " , " + obj.Street2; row.ADDRESS2 = obj.City_id + " - " + obj.Pincode_id + " , " + obj.State_id + ". Code -33, Email : " + obj.Email; row.COMPANY_GSTIN = " GSTIN : " + obj.Gstin + "";// , Cell : " + obj.Cell1 + " "; row.OUTWARD_ID = p_id; row.OUTWARD_NO = "NO : " + outward.Outward_no.ToString(); row.OUTWARD_DATE = "DATE : " + ConvertTO.Date2S(outward.Outward_date); Party _party_list = CParty_exten.PKId(outward.Party_id, new DAL()); row.PARTY_NAME = _party_list.Party_name; if (_party_list.Party_name != null) { row.STREET1 = _party_list.Street_1 + ", " + _party_list.Street_2; row.STREET2 = ""; row.CITY = _party_list.City_id + " - " + _party_list.Pincode_id + " ,"; //row.STATE = _party_list.State_id + " - " + CState_exten.GetStateCode(_party_list.State_id); row.COUNTRY = _party_list.Country_id; row.PINCODE = ""; if (_party_list.Gstin.Trim().Length != 0) { row.GSTIN += "GSTIN No : " + _party_list.Gstin; } } row.TOTAL_QTY = ConvertTO.DecimalToS(outward.Total_qty.ToString()); row.TOTAL_BUNDLE = outward.Total_bundel; row.DELIVREDTHROUGH = outward.Delivredthrough; 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); }