private static void FillGSTBaseLine()
 {
     dtGST       = new MasterRepository().GetGST();
     gstInfoList = new List <GSTInfo>();
     foreach (DataRow dr in dtGST.Rows)
     {
         GSTInfo gstInfo = new GSTInfo();
         gstInfo.UpdateGST(dr);
         gstInfoList.Add(gstInfo);
     }
 }
示例#2
0
        public static GSTInfo Get_GstCategory(string CategoryId, string ShipStateId, string OrganizationCode)
        {
            using (DBHelper dbhlper = new DBHelper("spGet_GstCategory"))
            {
                GSTInfo obj = new GSTInfo();
                obj.Percentage = "0";
                obj.SalePrice  = "0";

                DBHelper.AddPparameter("@CategoryId", CategoryId.Trim().Length > 0 ? Convert.ToInt32(CategoryId) : 0);
                DBHelper.AddPparameter("@OrganizationCode", OrganizationCode);
                DBHelper.AddPparameter("@ShipStateID", ShipStateId.Trim().Length > 0 ? Convert.ToInt32(ShipStateId) : 0);

                using (DataSet ds = DBHelper.Execute_Query())
                {
                    if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                    {
                        obj.Percentage = ds.Tables[0].Rows[0]["Percentage"] == DBNull.Value ? "0" : ds.Tables[0].Rows[0]["Percentage"].ToString();
                    }
                }

                return(obj);
            }
        }