Exemple #1
0
        private static List <Sales_Gst> SalesEntityList(string q)
        {
            List <Sales_Gst> list = new List <Sales_Gst>();

            using (IDataReader redr = new DAL().Listreader(q))
            {
                while (redr.Read() == true)
                {
                    Sales_Gst obj = new Sales_Gst()
                    {
                        Company_name  = "",
                        Acy_name      = "",
                        Sales_Month   = "",
                        Gstin         = redr[SALES_GST.GSTIN].ToString(),
                        Party_name    = redr[SALES_GST.PARTY_NAME].ToString(),
                        Bill_no       = redr[SALES_GST.BILL_NO].ToString(),
                        Bill_date     = ConvertTO.Date2S(redr[SALES_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);
        }
        private List <Sales_Gst> CollectSales()
        {
            List <Sales_Gst> list = new List <Sales_Gst>();

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