Exemplo n.º 1
0
        private static List <Purchase_Gst> PurchaseEntityList(string q)
        {
            List <Purchase_Gst> list = new List <Purchase_Gst>();

            using (IDataReader redr = new DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    Purchase_Gst obj = new Purchase_Gst()
                    {
                        Company_name   = "",
                        Acy_name       = "",
                        Purchase_Month = "",
                        Gstin          = redr[PURCHASE_GST.GSTIN].ToString(),
                        Party_name     = redr[PURCHASE_GST.PARTY_NAME].ToString(),
                        Bill_no        = redr[PURCHASE_GST.BILL_NO].ToString(),
                        Bill_date      = ConvertTO.Date2S(redr[PURCHASE_GST.BILL_DATE].ToString()),
                        Bill_amount    = ConvertTO.Decimal(redr[SALES_GST.BILL_AMOUNT].ToString()),
                        Taxable_value  = ConvertTO.Decimal(redr[SALES_GST.TAXABLE_VALUE].ToString()),
                        Sgst_percent   = redr[SALES_GST.SGST_PERCENT].ToString(),
                        Sgst_amount    = ConvertTO.Decimal(redr[SALES_GST.SGST_AMOUNT].ToString()),
                        Cgst_percent   = redr[SALES_GST.CGST_PERCENT].ToString(),
                        Cgst_amount    = ConvertTO.Decimal(redr[SALES_GST.CGST_AMOUNT].ToString()),
                        Igst_percent   = redr[SALES_GST.IGST_PERCENT].ToString(),
                        Igst_amount    = ConvertTO.Decimal(redr[SALES_GST.IGST_AMOUNT].ToString()),
                        Gst_total      = ConvertTO.Decimal(redr[SALES_GST.GST_TOTAL].ToString())
                    };
                    list.Add(obj);
                }
            }

            return(list);
        }
Exemplo n.º 2
0
        private List <Purchase_Gst> CollectPurchase()
        {
            List <Purchase_Gst> list = new List <Purchase_Gst>();

            for (int k = 0; k < Listgrid_1.RowCount; k++)
            {
                Purchase_Gst obj = new Purchase_Gst()
                {
                    Company_name   = Current.Company_Name,
                    Acy_name       = Current.Acy_Name,
                    Purchase_Month = Txt_month.Text.ToString(),
                    Gstin          = Listgrid_1[PURCHASE_GST.GSTIN, k].Value + "",
                    Party_name     = Listgrid_1[PURCHASE_GST.PARTY_NAME, k].Value + "",
                    Bill_no        = Listgrid_1[PURCHASE_GST.BILL_NO, k].Value + "",
                    Bill_date      = Listgrid_1[PURCHASE_GST.BILL_DATE, k].Value + "",
                    Bill_amount    = ConvertTO.Decimal("0" + Listgrid_1[PURCHASE_GST.BILL_AMOUNT, k].Value),
                    Taxable_value  = ConvertTO.Decimal("0" + Listgrid_1[PURCHASE_GST.TAXABLE_VALUE, k].Value),
                    Sgst_percent   = Listgrid_1[PURCHASE_GST.SGST_PERCENT, k].Value + "",
                    Sgst_amount    = ConvertTO.Decimal("0" + Listgrid_1[PURCHASE_GST.SGST_AMOUNT, k].Value),
                    Cgst_percent   = Listgrid_1[PURCHASE_GST.CGST_PERCENT, k].Value + "",
                    Cgst_amount    = ConvertTO.Decimal("0" + Listgrid_1[PURCHASE_GST.CGST_AMOUNT, k].Value),
                    Igst_percent   = Listgrid_1[PURCHASE_GST.IGST_PERCENT, k].Value + "",
                    Igst_amount    = ConvertTO.Decimal("0" + Listgrid_1[PURCHASE_GST.IGST_AMOUNT, k].Value),
                    Gst_total      = ConvertTO.Decimal("0" + Listgrid_1[PURCHASE_GST.GST_TOTAL, k].Value)
                };

                list.Add(obj);
            }

            return(list);
        }