/*================================================= 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); }
//sudha created on 19/12 public DataSet GetAllUsers() { CmdCAP = new SqlCommand(); DsCAP = CommonDbFunctions.FillDataSet("spGetAllUsersList", CmdCAP); return(DsCAP); }
/*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); }
public DataSet GeyAllProducts_Category_SubcategoryList() { CmdCAP = new SqlCommand(); DsCAP = CommonDbFunctions.FillDataSet("spGeyAllProducts_Category_SubcategoryList", CmdCAP); return(DsCAP); }
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); }
public DataTable GetAllCategories() { CmdCAP = new SqlCommand(); CmdCAP.CommandText = "spGetAllProducts_Category"; CmdCAP.CommandType = CommandType.StoredProcedure; dt = CommonDbFunctions.SetToDataTable(CmdCAP); return(dt); }
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); }
public DataSet GeyAllOrdersDetails() { CmdCAP = new SqlCommand(); DsCAP = CommonDbFunctions.FillDataSet("spGeyAllOrderDetails", CmdCAP); return(DsCAP); }
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); }
public DataTable getbrands() { CmdCAP = new SqlCommand(); CmdCAP.CommandText = "sp_getitembrand"; CmdCAP.CommandType = CommandType.StoredProcedure; dt = CommonDbFunctions.SetToDataTable(CmdCAP); return(dt); }
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)); }
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); }
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); }
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); }
/*------------------------------------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); }
public DataTable getmaterialwork() { CmdCAP = new SqlCommand(); CmdCAP.CommandText = "sp_getitemworktype"; CmdCAP.CommandType = CommandType.StoredProcedure; dt = CommonDbFunctions.SetToDataTable(CmdCAP); return(dt); }
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)); }
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); }
/*------------------------------------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); }
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)); }
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)); }
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); }
//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); }
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); }
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); }
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); }
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); }
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); }
public DataSet GetAllBrandsData() { // string itm_ids = ""; CmdCAP = new SqlCommand(); DsCAP = CommonDbFunctions.FillDataSet("GetAllBrandsData", CmdCAP); return(DsCAP); }
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); }