Exemple #1
0
        public DataSet GetGridViewData(LDMFunSchema objLDMFuncSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[1];

                param[0]       = new SqlParameter("@Districtid", SqlDbType.Int);
                param[0].Value = objLDMFuncSchema.Districtid;

                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "GetGridViewData", param))
                {
                    return(ds);
                }
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }
Exemple #2
0
        //Ldm Application Form
        public DataSet GetApplicationForm(LDMFunSchema objLDMFuncSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[3];
                param[0]       = new SqlParameter("@Status", SqlDbType.VarChar);
                param[0].Value = objLDMFuncSchema.Status;
                param[1]       = new SqlParameter("@ApplicationID", SqlDbType.VarChar);
                param[1].Value = objLDMFuncSchema.ApplicationID;
                param[2]       = new SqlParameter("@ActionType", SqlDbType.VarChar);
                param[2].Value = objLDMFuncSchema.ActionType;
                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "getFormApplicationDetails"))
                {
                    return(ds);
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }
Exemple #3
0
        public DataSet GetSocialCategoryViewReport(LDMFunSchema objLDMFuncSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[4];
                param[0]       = new SqlParameter("@Districtid", SqlDbType.Int);
                param[0].Value = objLDMFuncSchema.Districtid;

                param[1]       = new SqlParameter("@ShiLoanCategory", SqlDbType.VarChar);
                param[1].Value = objLDMFuncSchema.ShiLoanCategory;

                param[2]       = new SqlParameter("@KisLoanCategory", SqlDbType.VarChar);
                param[2].Value = objLDMFuncSchema.KisLoanCategory;

                param[3]       = new SqlParameter("@TarLoanCategory", SqlDbType.VarChar);
                param[3].Value = objLDMFuncSchema.TarLoanCategory;

                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "rep_CategoryLevelReport", param))
                {
                    return(ds);
                }
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }
Exemple #4
0
        public DataSet SearchSocialCategoryGridData(string searchTxt, LDMFunSchema objLDMFuncSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[2];
                //{
                //         new SqlParameter("@BankName", searchTxt == null ? (object)DBNull.Value :searchTxt),
                //};
                param[0]       = new SqlParameter("@Districtid", SqlDbType.Int);
                param[0].Value = objLDMFuncSchema.Districtid;
                param[1]       = new SqlParameter("@CategoryName", SqlDbType.VarChar);
                param[1].Value = searchTxt == null ? (object)DBNull.Value : searchTxt;

                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "GetSearchCategoryGridData", param))
                {
                    return(ds);
                }
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }
Exemple #5
0
        public static List <Data> GetBestFiveBanks()
        {
            DataSet      ds = new DataSet();
            DataTable    dt = new DataTable();
            LDMFunSchema objLDMFunSchema = new LDMFunSchema();
            LDMFunBAL    objLDMFunBAL    = new LDMFunBAL();

            objLDMFunSchema.Districtid = Convert.ToInt32(ddnm_static);
            ds = objLDMFunBAL.GetTopBestBank(objLDMFunSchema);
            dt = ds.Tables[0];
            List <Data> dataList = new List <Data>();
            string      cat      = "";
            int         val      = 0;

            foreach (DataRow dr in dt.Rows)
            {
                cat = dr[0].ToString();
                val = Convert.ToInt32(dr[1]);
                dataList.Add(new Data(cat, val));
            }
            //string str = Newtonsoft.Json.JsonConvert.SerializeObject(ds.Tables[0]);
            //JavaScriptSerializer json_serializer = new JavaScriptSerializer();
            //string bankdata = JsonConvert.DeserializeObject(str.ToString()).ToString();
            return(dataList);
        }
Exemple #6
0
 //Search District
 public DataSet SearchDistrictGridData(string searchTxt, LDMFunSchema objLDMFuncSchema)
 {
     try
     {
         ds = objLDMFunDL.SearchDistrictGridData(searchTxt, objLDMFuncSchema);
         return(ds);
     }
     catch (Exception)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
Exemple #7
0
 //Ldm Application Form
 public DataSet GetApplicationForm(LDMFunSchema objLDMFuncSchema)
 {
     try
     {
         ds = objLDMFunDL.GetApplicationForm(objLDMFuncSchema);
         return(ds);
     }
     catch (Exception)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
Exemple #8
0
 public DataSet GetLDMContentTarun(LDMFunSchema objLDMFuncSchema)
 {
     try
     {
         ds = objLDMFunDL.GetLDMContentTarun(objLDMFuncSchema);
         return(ds);
     }
     catch (Exception)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
Exemple #9
0
 public DataSet GetGridViewData(LDMFunSchema objLDMFuncSchema)
 {
     try
     {
         ds = objLDMFunDL.GetGridViewData(objLDMFuncSchema);
         return(ds);
     }
     catch (Exception)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
Exemple #10
0
 //Best Five District Performance
 public DataSet GetTopBestDistrict(LDMFunSchema objLDMFuncSchema)
 {
     try
     {
         ds = objLDMFunDL.GetTopBestDistrict(objLDMFuncSchema);
         return(ds);
     }
     catch (Exception)
     {
         return(null);
     }
     finally
     {
         ds = null;
     }
 }
Exemple #11
0
        //Report SocialCategory
        public DataSet GetSocialCategoryViewReport(LDMFunSchema objLDMFuncSchema)
        {
            try
            {
                ds = objLDMFunDL.GetSocialCategoryViewReport(objLDMFuncSchema);

                return(ds);
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                ds = null;
            }
        }
Exemple #12
0
        public DataSet LDMInsert(LDMFunSchema objLDMFuncSchema)
        {
            try
            {
                ds = objLDMFunDL.LDM_Insert(objLDMFuncSchema);

                return(ds);
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                ds = null;
            }
        }
Exemple #13
0
        public DataSet GetBankName(LDMFunSchema objLDMFunSchema)
        {
            try
            {
                ds = objLDMFunDL.GetBankName(objLDMFunSchema);

                return(ds);
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                ds = null;
            }
        }
Exemple #14
0
        public static List <Data> GetBestFiveDistrict()
        {
            DataSet      ds = new DataSet();
            DataTable    dt = new DataTable();
            LDMFunSchema objLDMFunSchema = new LDMFunSchema();
            LDMFunBAL    objLDMFunBAL    = new LDMFunBAL();

            objLDMFunSchema.Districtid = Convert.ToInt32(ddnm_static_District);
            ds = objLDMFunBAL.GetTopBestDistrict(objLDMFunSchema);
            dt = ds.Tables[0];
            List <Data> dataListDist = new List <Data>();
            string      cat          = "";
            int         val          = 0;

            foreach (DataRow dr in dt.Rows)
            {
                cat = dr[0].ToString();
                val = Convert.ToInt32(dr[1]);
                dataListDist.Add(new Data(cat, val));
            }
            return(dataListDist);
        }
        public static List <Data> GetBestFiveBank()
        {
            //SqlConnection conn = new SqlConnection(@"Data Source=123.108.51.115,21443;Initial Catalog=PMMY;User ID=mahaadmin;Password=Admin@123");
            //DataSet ds = new DataSet();
            //DataTable dt = new DataTable();
            //conn.Open();
            ////var ddnm = Session["LDM_DistrictId"];
            //string cmdstr = "select distinct top 5 ph.BankName, sum(LoanAmntOutStanding) 'Amount' from Ph_Sec_Excel ph join tblBankMaster b on b.BankName = ph.BankName where ph.DistrictId = "+ ddnm +"  group by ph.BankName order by Amount desc";
            //SqlCommand cmd = new SqlCommand(cmdstr, conn);
            //SqlDataAdapter adp = new SqlDataAdapter(cmd);
            //adp.Fill(ds);
            DataSet      ds = new DataSet();
            DataTable    dt = new DataTable();
            LDMFunSchema objLDMFunSchema = new LDMFunSchema();
            LDMFunBAL    objLDMFunBAL    = new LDMFunBAL();

            //var ddnm = Session["LDM_DistrictId"];
            //objLDMFunSchema.Districtid = Convert.ToInt32(hdn_ddnm.Value);
            objLDMFunSchema.Districtid = Convert.ToInt32(ddnm_static);
            ds = objLDMFunBAL.GetTopBestBank(objLDMFunSchema);
            dt = ds.Tables[0];
            List <Data> dataList = new List <Data>();
            string      cat      = "";
            int         val      = 0;

            foreach (DataRow dr in dt.Rows)
            {
                cat = dr[0].ToString();
                val = Convert.ToInt32(dr[1]);
                //dataList.Add(new Data(cat, val));
                dataList.Add(new Data(cat, val));
            }
            //string str = Newtonsoft.Json.JsonConvert.SerializeObject(ds.Tables[0]);
            //JavaScriptSerializer json_serializer = new JavaScriptSerializer();
            //string bankdata = JsonConvert.DeserializeObject(str.ToString()).ToString();

            return(dataList);
        }
Exemple #16
0
        public DataSet LDM_Insert(LDMFunSchema objLDMFuncSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[]
                {
                    //new SqlParameter("@Sr_No", objLDMFuncSchema.Sr_No == 0 ? 0 : objLDMFuncSchema.Sr_No),
                    new SqlParameter("@BankName", objLDMFuncSchema.BankName == null ? (object)DBNull.Value :objLDMFuncSchema.BankName),
                    new SqlParameter("@BankBranch", objLDMFuncSchema.BankBranch == null ? (object)DBNull.Value :objLDMFuncSchema.BankBranch),
                    new SqlParameter("@IFSCCode", objLDMFuncSchema.IFSCCode == null ? (object)DBNull.Value :objLDMFuncSchema.IFSCCode),
                    new SqlParameter("@App_Reg", objLDMFuncSchema.App_Reg == null ? (object)DBNull.Value :objLDMFuncSchema.App_Reg),
                    new SqlParameter("@Loan_Category", objLDMFuncSchema.Loan_Category == null ? (object)DBNull.Value :objLDMFuncSchema.Loan_Category),
                    new SqlParameter("@FirstName", objLDMFuncSchema.FirstName == null ? (object)DBNull.Value :objLDMFuncSchema.FirstName),
                    new SqlParameter("@MiddleName", objLDMFuncSchema.MiddleName == null ? (object)DBNull.Value :objLDMFuncSchema.MiddleName),
                    new SqlParameter("@LastName", objLDMFuncSchema.LastName == null ? (object)DBNull.Value :objLDMFuncSchema.LastName),
                    new SqlParameter("@Gender", objLDMFuncSchema.Gender == null ? (object)DBNull.Value :objLDMFuncSchema.Gender),
                    new SqlParameter("@MaritalStatus", objLDMFuncSchema.MaritalStatus == null ? (object)DBNull.Value :objLDMFuncSchema.MaritalStatus),
                    new SqlParameter("@Dob", objLDMFuncSchema.Dob == null ? (object)DBNull.Value :objLDMFuncSchema.Dob),
                    new SqlParameter("@Village", objLDMFuncSchema.Village == null ? (object)DBNull.Value :objLDMFuncSchema.Village),
                    new SqlParameter("@Gram", objLDMFuncSchema.Gram == null ? (object)DBNull.Value :objLDMFuncSchema.Gram),
                    new SqlParameter("@Tehsil", objLDMFuncSchema.Tehsil == null ? (object)DBNull.Value :objLDMFuncSchema.Tehsil),
                    new SqlParameter("@Block", objLDMFuncSchema.Block == null ? (object)DBNull.Value :objLDMFuncSchema.Block),
                    new SqlParameter("@District", objLDMFuncSchema.District == null ? (object)DBNull.Value :objLDMFuncSchema.District),
                    new SqlParameter("@Religion", objLDMFuncSchema.Religion == null ? (object)DBNull.Value :objLDMFuncSchema.Religion),
                    new SqlParameter("@Minority_Comm", objLDMFuncSchema.Minority_Comm == null ? (object)DBNull.Value :objLDMFuncSchema.Minority_Comm),
                    new SqlParameter("@Social_Category", objLDMFuncSchema.Social_Category == null ? (object)DBNull.Value :objLDMFuncSchema.Social_Category),
                    new SqlParameter("@Aadhar", objLDMFuncSchema.Aadhar == null ? (object)DBNull.Value :objLDMFuncSchema.Aadhar),
                    new SqlParameter("@PAN", objLDMFuncSchema.PAN == null ? (object)DBNull.Value :objLDMFuncSchema.PAN),
                    new SqlParameter("@Mobile", objLDMFuncSchema.Mobile == null ? (object)DBNull.Value :objLDMFuncSchema.Mobile),
                    new SqlParameter("@Email", objLDMFuncSchema.Email == null ? (object)DBNull.Value :objLDMFuncSchema.Email),
                    new SqlParameter("@ReqLoanAmnt", objLDMFuncSchema.ReqLoanAmnt == 0 ? 0 : objLDMFuncSchema.ReqLoanAmnt),
                    new SqlParameter("@SanctionAmnt", objLDMFuncSchema.SanctionAmnt == 0 ? 0 :objLDMFuncSchema.SanctionAmnt),
                    new SqlParameter("@SanctionDate", objLDMFuncSchema.SanctionDate == null ? (object)DBNull.Value :objLDMFuncSchema.SanctionDate),
                    new SqlParameter("@Business_Activity", objLDMFuncSchema.Business_Activity == null ? (object)DBNull.Value :objLDMFuncSchema.Business_Activity),
                    new SqlParameter("@Type_Loan", objLDMFuncSchema.Type_Loan == null ? (object)DBNull.Value :objLDMFuncSchema.Type_Loan),
                    new SqlParameter("@DisbursedAmnt", objLDMFuncSchema.DisbursedAmnt == 0 ? 0 :objLDMFuncSchema.DisbursedAmnt),
                    new SqlParameter("@DisburseDate", objLDMFuncSchema.DisburseDate == null ? (object)DBNull.Value :objLDMFuncSchema.DisburseDate),
                    new SqlParameter("@LoanAmntOutStanding", objLDMFuncSchema.LoanAmntOutStanding == 0 ? 0 :objLDMFuncSchema.LoanAmntOutStanding),
                    new SqlParameter("@AnualTarget", objLDMFuncSchema.AnualTarget == 0 ? 0 : objLDMFuncSchema.AnualTarget),
                    new SqlParameter("@Districtid", objLDMFuncSchema.Districtid == 0 ? 0 :objLDMFuncSchema.Districtid),
                    new SqlParameter("@BankId", objLDMFuncSchema.BankId == 0 ? 0 :objLDMFuncSchema.BankId),
                    new SqlParameter("@CategoryId", objLDMFuncSchema.CategoryId == 0 ? 0 :objLDMFuncSchema.CategoryId),
                    new SqlParameter("@InsertDate", objLDMFuncSchema.InsertDate == null ? (object)DBNull.Value :objLDMFuncSchema.InsertDate),
                    new SqlParameter("@InsertedBy", objLDMFuncSchema.InsertedBy == null ? (object)DBNull.Value : objLDMFuncSchema.InsertedBy),
                };
                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "usp_ReadDataInsert", param))
                {
                    return(ds);
                }
            }
            catch (Exception)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }