예제 #1
0
        /*=================================================           Orders   ==========================================================================*/

        public string AddOrders(orders item)
        {
            CmdCAP = new SqlCommand();

            item.ord_date      = DateTime.Now.ToString();
            item.ord_status    = "Ordered Taken";
            item.expe_dvy_date = DateTime.Now.AddDays(7).ToString();
            item.actl_dvy      = DateTime.Now.AddDays(7).ToString();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@uid", SqlDbType.Int, 100, item.uid));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@itm_id", SqlDbType.VarChar, 150, item.itm_id));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@aid", SqlDbType.Int, 50, item.aid));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@phone", SqlDbType.VarChar, 100, item.phone));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@amount", SqlDbType.Int, 100, item.amount));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@shippingchrgs", SqlDbType.Int, 100, item.shipping_charges));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@totalamount", SqlDbType.Int, 50, item.Total_amount));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@paymentmode", SqlDbType.VarChar, 100, item.payment_mode));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@cardno", SqlDbType.VarChar, 100, item.cardno));

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@cardname", SqlDbType.VarChar, 100, item.cardname));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@expmonth", SqlDbType.Int, 100, item.expmonth));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@expyear", SqlDbType.Int, 100, item.expyear));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@cvv", SqlDbType.Int, 50, item.cvv));

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@ord_date", SqlDbType.VarChar, 100, item.ord_date));

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@ord_status", SqlDbType.VarChar, 100, item.ord_status));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@expe_dvy_date", SqlDbType.VarChar, 100, item.expe_dvy_date));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@actl_dvy", SqlDbType.VarChar, 100, item.actl_dvy));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@bagstaus", SqlDbType.VarChar, 100, "ORD"));
            ErrorMessage = CommonDbFunctions.SqlCommandExecution(CommandType.StoredProcedure, "AddOrders", CmdCAP);
            return(ErrorMessage);
        }
예제 #2
0
        //sudha created on 19/12
        public DataSet GetAllUsers()
        {
            CmdCAP = new SqlCommand();

            DsCAP = CommonDbFunctions.FillDataSet("spGetAllUsersList", CmdCAP);

            return(DsCAP);
        }
예제 #3
0
        /*public DataSet Login(User user)
         *  {
         *      SqlDataAdapter da;
         *      DataSet ds = new DataSet();
         *
         *      SqlCommand sqlcommand = new SqlCommand();
         *
         *      SqlParameter[] param = new SqlParameter[2];
         *      param[0] = new SqlParameter("@Email", user.Email);
         *      param[1] = new SqlParameter("@Password", user.Password);
         *
         *      sqlcommand = new SqlCommand("spCheckUserLoginDetails", OpenConnection())
         *      {
         *          CommandType = CommandType.StoredProcedure
         *      };
         *      sqlcommand.Parameters.AddRange(param);
         *
         *      try
         *      {
         *          da = new SqlDataAdapter(sqlcommand);
         *          da.Fill(ds);
         *
         *      }
         *      catch (SqlException ex)
         *      {
         *          //handel sql excepetions
         *          Console.WriteLine(ex.Message + "  in UserDb StoreUser()");
         *      }
         *      catch (Exception ex)
         *      {
         *          //handel exceptions
         *          Console.WriteLine(ex.Message + "  in UserDb StoreUser()");
         *      }
         *      finally
         *      {
         *          CloseConnection();
         *      }
         *      return ds;
         *  }*/



        public DataSet Login(User user)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@Email", SqlDbType.VarChar, 100, string.IsNullOrEmpty(user.Email) ? SqlString.Null : user.Email));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@Password", SqlDbType.VarChar, 100, string.IsNullOrEmpty(user.Password) ? SqlString.Null : user.Password));
            DsCAP = CommonDbFunctions.FillDataSet("spCheckUserLoginDetails", CmdCAP);
            return(DsCAP);
        }
예제 #4
0
        public DataSet GeyAllProducts_Category_SubcategoryList()
        {
            CmdCAP = new SqlCommand();

            DsCAP = CommonDbFunctions.FillDataSet("spGeyAllProducts_Category_SubcategoryList", CmdCAP);

            return(DsCAP);
        }
예제 #5
0
 public string taskloginstring(string strEmail, string strPassword)
 {
     CmdCAP = new SqlCommand();
     AddParameter("@Email", SqlDbType.VarChar, 100, string.IsNullOrEmpty(strEmail)? SqlString.Null : strEmail);
     AddParameter("@Password", SqlDbType.VarChar, 100, string.IsNullOrEmpty(strPassword)? SqlString.Null : strPassword);
     ErrorMessage = CommonDbFunctions.SqlCommandExecution(CommandType.StoredProcedure, "spCheckUserLoginDetails", CmdCAP);
     return(ErrorMessage);
 }
예제 #6
0
 public DataTable GetAllCategories()
 {
     CmdCAP             = new SqlCommand();
     CmdCAP.CommandText = "spGetAllProducts_Category";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #7
0
 public DataSet GetItemsBySearchnames(string searchname)
 {
     CmdCAP = new SqlCommand();
     //@prod_subcat_id
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@name", SqlDbType.VarChar, 100, searchname));
     DsCAP = CommonDbFunctions.FillDataSet("GetItemsBasedsearch", CmdCAP);
     return(DsCAP);
 }
예제 #8
0
        public DataSet GeyAllOrdersDetails()
        {
            CmdCAP = new SqlCommand();

            DsCAP = CommonDbFunctions.FillDataSet("spGeyAllOrderDetails", CmdCAP);

            return(DsCAP);
        }
예제 #9
0
 public DataSet GetListItems(int id)
 {
     CmdCAP = new SqlCommand();
     //@prod_subcat_id
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@prod_subcat_id", SqlDbType.Int, 100, id));
     DsCAP = CommonDbFunctions.FillDataSet("GetKurtasData", CmdCAP);
     return(DsCAP);
 }
예제 #10
0
 public DataTable getbrands()
 {
     CmdCAP             = new SqlCommand();
     CmdCAP.CommandText = "sp_getitembrand";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #11
0
        public List <User> getvendoritemdetials(int vid)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@vid", SqlDbType.Int, 100, vid));

            DsCAP = CommonDbFunctions.FillDataSet("sp_vendoritemdetials", CmdCAP);

            return(CommonDbFunctions.ConvertDStolist(DsCAP));
        }
예제 #12
0
 public DataTable bindvendors()
 {
     CmdCAP = new SqlCommand();
     //CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@Imode", SqlDbType.VarChar, 100, "select"));
     CmdCAP.CommandText = "getvendors";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #13
0
 public DataTable bindpcategories(int pid)
 {
     CmdCAP = new SqlCommand();
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@pid", SqlDbType.Int, 0, pid));
     CmdCAP.CommandText = "sp_Products_Category";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #14
0
        public DataSet GetItemDetails(int id)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@itm_id", SqlDbType.Int, 100, id));

            DsCAP = CommonDbFunctions.FillDataSet("GetItemDetails", CmdCAP);

            return(DsCAP);
        }
예제 #15
0
        /*------------------------------------bag------------------------------------------------------*/


        public DataSet GetUserBagDetailsById(int id)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@uid", SqlDbType.Int, 100, id));

            DsCAP = CommonDbFunctions.FillDataSet("GetUserBagDetials", CmdCAP);

            return(DsCAP);
        }
예제 #16
0
        public DataTable getmaterialwork()
        {
            CmdCAP = new SqlCommand();

            CmdCAP.CommandText = "sp_getitemworktype";
            CmdCAP.CommandType = CommandType.StoredProcedure;
            dt = CommonDbFunctions.SetToDataTable(CmdCAP);
            return(dt);
        }
예제 #17
0
        public List <Vitem> getvendorwiseitems(int vid)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@vid", SqlDbType.Int, 100, vid));

            DsCAP = CommonDbFunctions.FillDataSet("sp_vendortotitems", CmdCAP);

            return(CommonDbFunctions.convertitemstolist(DsCAP));
        }
예제 #18
0
 public DataTable getdescitems(int vid)
 {
     CmdCAP = new SqlCommand();
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@vid", SqlDbType.Int, 100, vid));
     CmdCAP.CommandText = "sp_getvendoritemdesclist";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #19
0
        /*------------------------------------whish list------------------------------------------------------*/

        public DataSet GetDataFromWhishList(int uid)
        {
            CmdCAP = new SqlCommand();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@uid", SqlDbType.Int, 100, uid));
            DsCAP = CommonDbFunctions.FillDataSet("GetWhishListData", CmdCAP);

            return(DsCAP);
        }
예제 #20
0
        public User GetUserDataById(int id)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@UID", SqlDbType.Int, 100, id));

            DsCAP = CommonDbFunctions.FillDataSet("spGetAllUserDetailsByID", CmdCAP);


            return(CommonDbFunctions.ConvertDStoBO(DsCAP));
        }
예제 #21
0
        public List <AddressModel> GetUserAddressDataById(int id)
        {
            CmdCAP = new SqlCommand();
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@UID", SqlDbType.Int, 100, id));

            DsCAP = CommonDbFunctions.FillDataSet("GetAddressDetails", CmdCAP);


            return(CommonDbFunctions.ConvertAddressDStoBO(DsCAP));
        }
예제 #22
0
        public string DleteAddressById(int uid, int aid)
        {
            CmdCAP = new SqlCommand();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@AID", SqlDbType.Int, 100, string.IsNullOrEmpty(aid.ToString()) ? SqlInt32.Null : Convert.ToInt32(aid)));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@UID", SqlDbType.Int, 100, string.IsNullOrEmpty(uid.ToString()) ? SqlInt32.Null : Convert.ToInt32(uid)));

            ErrorMessage = CommonDbFunctions.SqlCommandExecution(CommandType.StoredProcedure, "DeleteAddress", CmdCAP);
            return(ErrorMessage);
        }
예제 #23
0
        //sudha created on 02/01
        public DataSet GetAllVendorsByActiveStatus(int IsActive)
        {
            CmdCAP = new SqlCommand();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@IsActive", SqlDbType.Int, 0, IsActive));

            DsCAP = CommonDbFunctions.FillDataSet("spGetAllVendorsByActiveStatus", CmdCAP);

            return(DsCAP);
        }
예제 #24
0
 public DataTable bindsubcatbyvid(int prod_cat_id, int vid)
 {
     CmdCAP = new SqlCommand();
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@prod_cat_id", SqlDbType.Int, 0, prod_cat_id));
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@vid", SqlDbType.Int, 0, vid));
     CmdCAP.CommandText = "Sp_Products_Subcategorybyvid";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #25
0
 public DataTable getitemname(int vid, int prodscatid)
 {
     CmdCAP = new SqlCommand();
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@vid", SqlDbType.Int, 100, vid));
     CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@prod_subcat_id", SqlDbType.Int, 100, prodscatid));
     CmdCAP.CommandText = "sp_getitemnames";
     CmdCAP.CommandType = CommandType.StoredProcedure;
     dt = CommonDbFunctions.SetToDataTable(CmdCAP);
     return(dt);
 }
예제 #26
0
        public string RemoveItemFromWhishList(Item item)
        {
            CmdCAP = new SqlCommand();


            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@wh_id", SqlDbType.Int, 100, item.bag_id));

            ErrorMessage = CommonDbFunctions.SqlCommandExecution(CommandType.StoredProcedure, "RemoveItemfromWhishList", CmdCAP);
            return(ErrorMessage);
        }
예제 #27
0
        public string UpdateProfilePic(int id, string imagepath)
        {
            CmdCAP = new SqlCommand();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@UID", SqlDbType.Int, 100, id));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@Image", SqlDbType.VarChar, 200, string.IsNullOrEmpty(imagepath) ? SqlString.Null : imagepath));


            ErrorMessage = CommonDbFunctions.SqlCommandExecution(CommandType.StoredProcedure, "updateprofilephoto", CmdCAP);
            return(ErrorMessage);
        }
예제 #28
0
        public string UpdatePassword(int id, string password)
        {
            CmdCAP = new SqlCommand();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@UID", SqlDbType.Int, 100, id));
            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@Password", SqlDbType.VarChar, 100, string.IsNullOrEmpty(password) ? SqlString.Null : password));


            ErrorMessage = CommonDbFunctions.SqlCommandExecution(CommandType.StoredProcedure, "UpdatePassword", CmdCAP);
            return(ErrorMessage);
        }
예제 #29
0
        public DataSet GetAllBrandsData()
        {
            // string itm_ids = "";

            CmdCAP = new SqlCommand();


            DsCAP = CommonDbFunctions.FillDataSet("GetAllBrandsData", CmdCAP);

            return(DsCAP);
        }
예제 #30
0
        public DataSet GetBrandsDataById(string name)
        {
            // string itm_ids = "";

            CmdCAP = new SqlCommand();

            CmdCAP.Parameters.Add(CommonDbFunctions.AddParameter("@Bname", SqlDbType.VarChar, 150, name));
            DsCAP = CommonDbFunctions.FillDataSet("GetProductsDataByBrands", CmdCAP);

            return(DsCAP);
        }