Exemple #1
0
        public static DropDownnSchema[] PopulateBank(int TalukaID)
        {
            string    conn = ConfigurationManager.ConnectionStrings["Local"].ToString();
            DataTable dt   = new DataTable();
            List <DropDownnSchema> custList = new List <DropDownnSchema>();

            using (SqlConnection con = new SqlConnection(conn))
            {
                using (SqlCommand command = new SqlCommand("SP_PopulateBankDetails", con))
                {
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@TalukaID", TalukaID);
                    con.Open();
                    SqlDataAdapter da = new SqlDataAdapter(command);
                    da.Fill(dt);
                    foreach (DataRow dtrow in dt.Rows)
                    {
                        DropDownnSchema cust = new DropDownnSchema();
                        cust.BankName               = dtrow["BankName"].ToString();
                        cust.BranchAddress          = dtrow["BranchAddress"].ToString();
                        cust.BranchManagerName      = dtrow["BranchManagerName"].ToString();
                        cust.BranchTelNowithSTDcode = dtrow["BranchTelNowithSTDcode"].ToString();
                        custList.Add(cust);
                    }
                }
            }
            return(custList.ToArray());
        }
Exemple #2
0
        //public static string ArrayList BindDistrict(int StateID, string langid)
        //{

        //    try
        //    {

        //        list = BindDistrict(StateID, langid);
        //        return list;
        //    }
        //    catch (Exception e)
        //    {
        //        return null;
        //    }
        //    finally
        //    {
        //        list = null;
        //    }
        //}



        public DataSet PopulateBankDetails(DropDownnSchema objDropDownnSchema)
        {
            try
            {
                ds = objdropdownBindDAL.BindState(objDropDownnSchema);
                return(ds);
            }
            catch (Exception e)
            {
                return(null);
            }
            finally
            {
                ds = null;
            }
        }
Exemple #3
0
        public DataSet BindState(DropDownnSchema objDropDownnSchema)
        {
            SqlConnection objConn = SQLHelper.OpenConnection();

            try
            {
                SqlParameter[] param = new SqlParameter[1];
                param[0]       = new SqlParameter("@LangID", SqlDbType.VarChar);
                param[0].Value = objDropDownnSchema.Langid;

                using (DataSet ds = SQLHelper.ExecuteDataset(objConn, null, CommandType.StoredProcedure, "Sp_BindStateDropDown", param))
                {
                    return(ds);
                }
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                SQLHelper.CloseConnection(objConn);
            }
        }