Ejemplo n.º 1
0
        public SqlDataAdapter ReqCity()
        {
            AddCustomerDAL ud = new AddCustomerDAL();
            SqlDataAdapter rd = ud.GetCity();

            return(rd);
        }
Ejemplo n.º 2
0
        public void UserInsertBusiness(Users u)
        {
            SqlParameter[] sp = new SqlParameter[10];

            sp[0] = new SqlParameter("@upassword", u.UserPassword);
            sp[1] = new SqlParameter("@uname", u.UserName);
            sp[2] = new SqlParameter("@emailid", u.UserEmailId);
            sp[3] = new SqlParameter("@mobile", u.UserMobile);
            sp[4] = new SqlParameter("@annual_income", u.UserIncome);
            sp[5] = new SqlParameter("@pincode", u.UserPincode);
            sp[6] = new SqlParameter("@address", u.UserAddress);
            sp[7] = new SqlParameter("@dob", u.UserDob);
            sp[8] = new SqlParameter("@created_at", u.CreatedAt);
            sp[9] = new SqlParameter("@city_name", u.UserCity);



            try
            {
                AddCustomerDAL ud = new AddCustomerDAL();
                ud.insert_User(sp);
            }
            catch (Exception e)
            {
                Console.Write(e);
            }
        }
Ejemplo n.º 3
0
        public SqlDataAdapter UserCredentials(Users u)
        {
            SqlParameter[] sp = new SqlParameter[1];

            sp[0] = new SqlParameter("@email", u.UserEmailId);

            AddCustomerDAL ud = new AddCustomerDAL();
            SqlDataAdapter rd = ud.GetUserCredential(sp);

            return(rd);
        }
        public int GetAddResult(Customers customers)
        {
            AddCustomerDAL AddCS = new AddCustomerDAL();
            int            r     = AddCS.InsertCustomer(customers);

            if (r > 0)
            {
                return(1);//表示成功
            }
            else
            {
                return(2);//表示失败
            }
        }