public static Print_quotationItemsList GetData(string p_id) { Print_quotationItemsList list = new Print_quotationItemsList(); // List <Quotationitems> inv_item_list = new List <Quotationitems>(); //if (Customise.Invoice_poid_dcid == true) //{ // inv_item_list = CQuotationitems_exten.FKId(p_id, new DAL()); //} //if ((Customise.Invoice_pono_dcno == true) || (Customise.Invoice_Without_podc == true)) //{ inv_item_list = CQuotationitems_exten.FKNo(p_id, new DAL()); //} for (int r = 0; r <= inv_item_list.Count - 1; r++) { Print_quotationitemsRow row = new Print_quotationitemsRow(); // row.QUOTATION_ITEM_ID = inv_item_list[r].Quotationitems_id; row.QUOTATION_ID = inv_item_list[r].Quotation_id; row.SL_NO = (r + 1).ToString(); row.PRODUCT_ID = Checks.RemoveEscape(inv_item_list[r].Product_id); row.HSN_CODE_ID = Ccoreplus.GetHsncode_name(inv_item_list[r].Product_id); row.SIZES_ID = inv_item_list[r].Sizes_id; row.QTY = ConvertTO.DecimalToS(inv_item_list[r].Qty); row.PRICE = ConvertTO.Decimal2d(inv_item_list[r].Price.ToString()); decimal vAmount = 0M; decimal vTaxableValue = 0M; decimal vQty = Global.ToDecimal(row.QTY); decimal vPrice = Global.ToDecimal(row.PRICE); vTaxableValue = vQty * vPrice; vAmount = vTaxableValue; row.TAXABLEVALUE = ConvertTO.Decimal2d(vTaxableValue.ToString()); row.SUB_TOTAL = ConvertTO.Decimal2d(vAmount.ToString()); // list.Add(row); // } // return(list); }
public void SetAction(BtnEvent pAction, string pPkValue) { fAction = pAction; switch (fAction) { case BtnEvent.Open: btn_save.Text = "&CLOSE"; obj = CQuotation_exten.PKId(pPkValue, new DAL()); list = CQuotationitems_exten.FKNo(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.New: btn_save.Text = "&SAVE"; obj = CQuotation.GetNew; list = CQuotationitems.GetNew; this.EnableControls(true); break; case BtnEvent.Edit: btn_save.Text = "&UPDATE"; obj = CQuotation_exten.PKId(pPkValue, new DAL()); list = CQuotationitems_exten.FKNo(pPkValue, new DAL()); this.EnableControls(true); break; case BtnEvent.Delete: btn_save.Text = "CONFIRM\r\n&DELETE"; obj = CQuotation_exten.PKId(pPkValue, new DAL()); list = CQuotationitems_exten.FKNo(pPkValue, new DAL()); this.EnableControls(false); break; case BtnEvent.Print: btn_save.Text = "&PRINT"; obj = CQuotation_exten.PKId(pPkValue, new DAL()); list = CQuotationitems_exten.FKNo(pPkValue, new DAL()); this.EnableControls(false); break; } LoadData(obj); Loaditems(list); }