private static List <Outward> EntityList(string q) { List <Outward> list = new List <Outward>(); using (IDataReader redr = new DAL().Listreader(q)) { while (redr.Read() == true) { Outward obj = new Outward() { Inward_id = redr[OUTWARD.OUTWARD_ID].ToString(), Uniqueno = redr[OUTWARD.UNIQUENO].ToString(), Company_id = redr[OUTWARD.COMPANY_ID].ToString(), Acy_id = redr[OUTWARD.ACY_ID].ToString(), Order_id = redr[ORDER.ORDER_NO].ToString(), Outward_no = redr[OUTWARD.OUTWARD_NO].ToString(), Outward_date = redr[OUTWARD.OUTWARD_DATE].ToString(), Party_id = redr[OUTWARD.PARTY_ID].ToString(), Total_qty = redr[OUTWARD.TOTAL_QTY].ToString(), Total_bundel = redr[OUTWARD.TOTAL_BUNDEL].ToString(), Delivredthrough = redr[OUTWARD.DELIVREDTHROUGH].ToString(), Locked = redr[OUTWARD.LOCKED].ToString(), Notes = redr[OUTWARD.NOTES].ToString(), Active_id = redr[OUTWARD.ACTIVE_ID].ToString(), User_id = redr[USER.USER_NAME].ToString() }; list.Add(obj); } redr.Close(); } return(list); }
public static string GetName_Id(string _pId) { Outward obj = PKId(_pId); if (obj != null) { return(obj.Outward_no); } return(""); }
public static bool LockStatus(string pkValue) { if (pkValue != null) { Outward obj = PKId(pkValue); if (obj.Locked == Core.Unlocked) { return(false); } } return(true); }
private void LoadData(Outward obj) { vId = obj.Inward_id; txt_order_id.Text = obj.Order_id; txt_outward_no.Text = obj.Outward_no.ToString(); txt_outward_date.Text = obj.Outward_date; txt_party_id.Text = obj.Party_id; txt_total_qty.Text = obj.Total_qty.ToString(); txt_total_bundel.Text = obj.Total_bundel; txt_deliveredthrough.Text = obj.Delivredthrough; txt_notes.Text = obj.Notes; Core.Stative = obj.Active_id; Setactives(); }
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); }
private static string AttachParams(string q, Outward v) { q = q.Replace("@" + OUTWARD.OUTWARD_ID + "@", "" + ConvertTO.SqlString(v.Inward_id) + ""); q = q.Replace("@" + OUTWARD.UNIQUENO + "@", "" + ConvertTO.SqlString(v.Uniqueno) + ""); q = q.Replace("@" + OUTWARD.COMPANY_ID + "@", "" + ConvertTO.SqlString(v.Company_id) + ""); q = q.Replace("@" + OUTWARD.ACY_ID + "@", "" + ConvertTO.SqlString(v.Acy_id) + ""); q = q.Replace("@" + OUTWARD.ORDER_ID + "@", "" + ConvertTO.SqlString(v.Order_id) + ""); q = q.Replace("@" + OUTWARD.OUTWARD_NO + "@", "" + ConvertTO.SqlString(v.Outward_no) + ""); q = q.Replace("@" + OUTWARD.OUTWARD_DATE + "@", "" + ConvertTO.SqlDate(v.Outward_date) + ""); q = q.Replace("@" + OUTWARD.PARTY_ID + "@", "" + ConvertTO.SqlString(v.Party_id) + ""); q = q.Replace("@" + OUTWARD.TOTAL_BUNDEL + "@", "" + ConvertTO.SqlString(v.Total_bundel) + ""); q = q.Replace("@" + OUTWARD.TOTAL_QTY + "@", "" + ConvertTO.SqlString(v.Total_qty) + ""); q = q.Replace("@" + OUTWARD.TOTAL_BUNDEL + "@", "" + ConvertTO.SqlString(v.Total_bundel) + ""); q = q.Replace("@" + OUTWARD.DELIVREDTHROUGH + "@", "" + ConvertTO.SqlString(v.Delivredthrough) + ""); q = q.Replace("@" + OUTWARD.LOCKED + "@", "" + ConvertTO.SqlString(v.Locked) + ""); q = q.Replace("@" + OUTWARD.NOTES + "@", "" + ConvertTO.SqlString(v.Notes) + ""); q = q.Replace("@" + OUTWARD.ACTIVE_ID + "@", "" + ConvertTO.SqlString(v.Active_id) + ""); q = q.Replace("@" + OUTWARD.USER_ID + "@", "" + ConvertTO.SqlString(v.User_id) + ""); return(q); }
public static void Update(Outward v, DAL dalsession) { string q = "UPDATE " + OUTWARD.OUTWARD_TBL + " SET"; q += " " + OUTWARD.UNIQUENO + " = @" + OUTWARD.UNIQUENO + "@ \r\n"; q += "," + OUTWARD.COMPANY_ID + " = @" + OUTWARD.COMPANY_ID + "@ \r\n"; q += "," + OUTWARD.ACY_ID + " = @" + OUTWARD.ACY_ID + "@ \r\n"; q += "," + OUTWARD.ORDER_ID + " = @" + OUTWARD.ORDER_ID + "@ \r\n "; q += "," + OUTWARD.OUTWARD_NO + " = @" + OUTWARD.OUTWARD_NO + "@ \r\n "; q += "," + OUTWARD.OUTWARD_DATE + " = @" + OUTWARD.OUTWARD_DATE + "@ \r\n "; q += "," + OUTWARD.PARTY_ID + " = @" + OUTWARD.PARTY_ID + "@ \r\n "; q += "," + OUTWARD.TOTAL_BUNDEL + " = @" + OUTWARD.TOTAL_BUNDEL + "@ \r\n "; q += "," + OUTWARD.TOTAL_QTY + " = @" + OUTWARD.TOTAL_QTY + "@ \r\n "; q += "," + OUTWARD.DELIVREDTHROUGH + " = @" + OUTWARD.DELIVREDTHROUGH + "@ \r\n "; q += "," + OUTWARD.LOCKED + " = @" + OUTWARD.LOCKED + "@ \r\n "; q += "," + OUTWARD.NOTES + " = @" + OUTWARD.NOTES + "@ \r\n "; q += "," + OUTWARD.ACTIVE_ID + " = @" + OUTWARD.ACTIVE_ID + "@ \r\n "; q += "," + OUTWARD.USER_ID + " = @" + OUTWARD.USER_ID + "@ \r\n "; q += " WHERE " + OUTWARD.OUTWARD_ID + " = @" + OUTWARD.OUTWARD_ID + "@ "; q = AttachParams(q, v); dalsession.Execute(q); }
public static void Insert(Outward v, DAL dalsession) { string q = " INSERT INTO " + OUTWARD.OUTWARD_TBL + " ( "; q += " " + OUTWARD.UNIQUENO + "\r\n"; q += "," + OUTWARD.COMPANY_ID + "\r\n"; q += "," + OUTWARD.ACY_ID + "\r\n"; q += "," + OUTWARD.ORDER_ID + " \r\n"; q += "," + OUTWARD.OUTWARD_NO + " \r\n"; q += "," + OUTWARD.OUTWARD_DATE + " \r\n"; q += "," + OUTWARD.PARTY_ID + " \r\n"; q += "," + OUTWARD.TOTAL_QTY + " \r\n"; q += "," + OUTWARD.TOTAL_BUNDEL + " \r\n"; q += "," + OUTWARD.DELIVREDTHROUGH + " \r\n"; q += "," + OUTWARD.LOCKED + " \r\n"; q += "," + OUTWARD.NOTES + " \r\n"; q += "," + OUTWARD.ACTIVE_ID + " \r\n"; q += "," + OUTWARD.USER_ID + " \r\n "; q += " ) VALUES ( "; q += " @" + OUTWARD.UNIQUENO + "@ \r\n"; q += ", @" + OUTWARD.COMPANY_ID + "@ \r\n"; q += ", @" + OUTWARD.ACY_ID + "@ \r\n"; q += ", @" + OUTWARD.ORDER_ID + "@ \r\n"; q += ", @" + OUTWARD.OUTWARD_NO + "@ \r\n"; q += ", @" + OUTWARD.OUTWARD_DATE + "@ \r\n"; q += ", @" + OUTWARD.PARTY_ID + "@ \r\n"; q += ", @" + OUTWARD.TOTAL_QTY + "@ \r\n"; q += ", @" + OUTWARD.TOTAL_BUNDEL + "@ \r\n"; q += ", @" + OUTWARD.DELIVREDTHROUGH + "@ \r\n"; q += ", @" + OUTWARD.LOCKED + "@ \r\n"; q += ", @" + OUTWARD.NOTES + "@ \r\n"; q += ", @" + OUTWARD.ACTIVE_ID + "@ \r\n"; q += ", @" + OUTWARD.USER_ID + "@ \r\n"; q += " ) \r\n "; q = AttachParams(q, v); dalsession.Execute(q); }
private Outward CollectData() { Outward fobj = new Outward() { Inward_id = vId, Uniqueno = Current.Acy_id + "~" + Current.Company_id + "~" + txt_outward_no.Text, Company_id = Current.Company_id, Acy_id = Current.Acy_id, Order_id = COrder_exten.GetId_Name(txt_order_id.Text, "", "", ""), Outward_no = txt_outward_no.Text, Outward_date = txt_outward_date.Text, Party_dcno = txt_party_dcno.Text, Party_id = CParty_exten.GetId_Name(txt_party_id.Text), Total_qty = txt_total_qty.Text, Total_bundel = txt_total_bundel.Text, Delivredthrough = txt_deliveredthrough.Text, Locked = Core.Unlocked, Notes = txt_notes.Text, Active_id = Core.Stative, User_id = Current.User }; return(fobj); }