public int addUpdateUsersDetails(BEL obj_d) { try { SqlParameter[] p = new SqlParameter[17]; p[0] = new SqlParameter("@ShipFname", obj_d.ShipFname); p[1] = new SqlParameter("@ShipLname", obj_d.ShipLname); p[2] = new SqlParameter("@ShipEmail", obj_d.ShipEmail); p[3] = new SqlParameter("@ShipMobile", obj_d.ShipMobile); p[4] = new SqlParameter("@ShipAddress", obj_d.ShipAddress); p[5] = new SqlParameter("@ShipNearby", obj_d.ShipNearby); p[6] = new SqlParameter("@ShipState", obj_d.ShipState); p[7] = new SqlParameter("@ShipZip", obj_d.ShipZip); p[8] = new SqlParameter("@BillFname", obj_d.BillFname); p[9] = new SqlParameter("@BillLname", obj_d.BillLname); p[10] = new SqlParameter("@BillEmailid", obj_d.BillEmailid); p[11] = new SqlParameter("@BillContact", obj_d.BillContact); p[12] = new SqlParameter("@BillAddress", obj_d.BillAddress); p[13] = new SqlParameter("@BillNearby", obj_d.BillNearby); p[14] = new SqlParameter("@BillState", obj_d.BillState); p[15] = new SqlParameter("@BillZip", obj_d.BillZip); p[16] = new SqlParameter("@TransactionId", obj_d.TransId); return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProaddUpdateUserDetails", p)); } catch (Exception ex) { throw new Exception(ex.Message); } }
//Insert Order Details public int InsertProductDetails(BEL obj_d) { try { SqlParameter[] p = new SqlParameter[43]; p[0] = new SqlParameter("@ProductId", obj_d.ProductId); p[1] = new SqlParameter("@TransId", obj_d.TransId); p[2] = new SqlParameter("@Userid", obj_d.Userid); p[3] = new SqlParameter("@ShipFname", obj_d.ShipFname); p[4] = new SqlParameter("@ShipLname", obj_d.ShipLname); p[5] = new SqlParameter("@ShipEmail", obj_d.ShipEmail); p[6] = new SqlParameter("@ShipCompany", obj_d.ShipCompany); p[7] = new SqlParameter("@ShipMobile", obj_d.ShipMobile); p[8] = new SqlParameter("@ShipAddress", obj_d.ShipAddress); p[9] = new SqlParameter("@ShipNearby", obj_d.ShipNearby); p[10] = new SqlParameter("@ShipCountry", obj_d.ShipCountry); p[11] = new SqlParameter("@ShipState", obj_d.ShipState); p[12] = new SqlParameter("@ShipCity", obj_d.ShipCity); p[13] = new SqlParameter("@ShipZip", obj_d.ShipZip); p[14] = new SqlParameter("@BillFname", obj_d.BillFname); p[15] = new SqlParameter("@BillLname", obj_d.BillLname); p[16] = new SqlParameter("@BillEmailid", obj_d.BillEmailid); p[17] = new SqlParameter("@BillCompay", obj_d.BillCompay); p[18] = new SqlParameter("@BillContact", obj_d.BillContact); p[19] = new SqlParameter("@BillAddress", obj_d.BillAddress); p[20] = new SqlParameter("@BillNearby", obj_d.BillNearby); p[21] = new SqlParameter("@BillCountry", obj_d.BillCountry); p[22] = new SqlParameter("@BillState", obj_d.BillState); p[23] = new SqlParameter("@BillCity", obj_d.BillCity); p[24] = new SqlParameter("@BillZip", obj_d.BillZip); p[25] = new SqlParameter("@Productname", obj_d.Productname); p[26] = new SqlParameter("@Quantity", obj_d.Quantity); p[27] = new SqlParameter("@Thumbnail", obj_d.Thumbnail); p[28] = new SqlParameter("@Orderdetailid", obj_d.Orderdetailid); p[29] = new SqlParameter("@Currency", obj_d.Currency); p[30] = new SqlParameter("@Paymentmode", obj_d.Paymentmode); p[31] = new SqlParameter("@ItemSubTotal", obj_d.ItemSubtotal); p[32] = new SqlParameter("@ShippingCharge", obj_d.ShippinCharge); p[33] = new SqlParameter("@ItemPrice", obj_d.ItemPrice); p[34] = new SqlParameter("@Orderstatus", obj_d.Orderstatus); p[35] = new SqlParameter("@OrderCancel", obj_d.OrderCancel); p[36] = new SqlParameter("@Useridentifyno", obj_d.UserIdetifyNo); p[37] = new SqlParameter("@Capacity", obj_d.Capacity); p[38] = new SqlParameter("@Flavour", obj_d.Flavour); p[39] = new SqlParameter("@VariantName", obj_d.Variantname); p[40] = new SqlParameter("@VariantQuantity", obj_d.Variantquantity); p[41] = new SqlParameter("@CouponPrice", obj_d.finalCouponPrice); p[42] = new SqlParameter("@FinalShippingCharges", obj_d.FinalShippingCharges); return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProAddOrderDetails", p)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteSubsubCategory(int subsubid) { try { string query = "delete from t_MiniCategory where MiniCategoryId='" + subsubid + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int UpdateOrderStatus(string orderstatus, string deliverydate, string orderno, string orderid) { try { string query = "update t_OrderDetail set Orderstatus='" + orderstatus + "', DeliveryDate='" + deliverydate + "' where Orderdetailid='" + orderno + "' and OrderId='" + orderid + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int AddRecomendedProduct(string productname, string userid) { try { string query = "insert into t_Wishlist(Name, UserId) values('" + productname + "', '" + userid + "')"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int CancelOrder(string transid, string orderid, bool cancel) { try { string query = @"update t_OrderDetail Set Orderstatus='Order Cancel', OrderCancel='" + cancel + "' where Orderstatus='Order' and TransId='" + transid + "' and OrderId='" + orderid + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int UpdateOrderDetail(string transactionID, string paymentmode, string orderstatus) { try { string query = "update t_OrderDetail set Paymentmode='" + paymentmode + "', Orderstatus='" + orderstatus + "' where TransId='" + transactionID + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeletWishlist(int wislistid) { try { string query = "delete from t_Wishlist where WishId='" + wislistid + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
//Wishlist public int AddNewWishlist(Int32 productid, string transid, decimal price, Int32 dicount, string name, string thumbnail, int userid, string usermobile) { try { string query = "insert into t_Wishlist (ProductId, TransId, Price, Discount, Name, Thumbnail, UserId, UserIdentifyNo) values('" + productid + "','" + transid + "','" + price + "','" + dicount + "','" + name + "','" + thumbnail + "','" + userid + "','" + usermobile + "')"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int CreateNewUser(string name, string password, string gender, string dob, string emailid, string state, string city, string mobile, string active, int role, string logintype) { try { int inval = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProNewCreateUser", new SqlParameter("@Name", name), new SqlParameter("@Password", password), new SqlParameter("@Gender", gender), new SqlParameter("@DOB", dob), new SqlParameter("@Emailid", emailid), new SqlParameter("@State", state), new SqlParameter("@City", city), new SqlParameter("@Mobile", mobile), new SqlParameter("@active", active), new SqlParameter("@role", role), new SqlParameter("@logintype", logintype)); return(Convert.ToInt32(inval)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int UpdatePasswordAdmin(string newpassword, string loginid) { try { string query = "Update t_login set Password='******' where LoginID='" + loginid + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteVideo(Int32 videoid) { try { string query = "Delete from t_video where videoid='" + videoid + "'"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int UpdateSubsubCategory(string subsubname, string subcategoryid, string categoryid, Int32 subsubId) { try { string query = "update t_MiniCategory set MiniName='" + subsubname + "', SubCategoryID='" + subcategoryid + "', CategoryID='" + categoryid + "' where MiniCategoryId=" + subsubId + ""; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int CreateNewUser(string fname, string lname, string emailid, string password, string active, int role, string logintype, string useridno) { try { int inval = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProNewCreateUser", new SqlParameter("@Firstname", fname), new SqlParameter("@Lastname", lname), new SqlParameter("@Emailid", emailid), new SqlParameter("@password", password), new SqlParameter("@active", active), new SqlParameter("@role", role), new SqlParameter("@logintype", logintype), new SqlParameter("@UserIdenttno", useridno)); return(Convert.ToInt32(inval)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int AddNewProduct(string name, string price, string image, string thumbnail, string description, Int32 subsubcategoryid, Int32 subcategoryid, string categoryid) { try { int success = 0; success = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProAddProduct", new SqlParameter("@Name", name), new SqlParameter("@Price", price), new SqlParameter("@Image", image), new SqlParameter("@Thumbnail", thumbnail), new SqlParameter("@Description", description), new SqlParameter("@SubSubCategoryId", subsubcategoryid), new SqlParameter("@SubCategoryId", subcategoryid), new SqlParameter("@CategoryId", categoryid)); return(success); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteProduct(string Productid) { try { int result; result = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProDeleteProduct", new SqlParameter("@ProductId", Productid)); return(result); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteCategory(Int32 cagegoryid) { try { int success = 0; string query = "delete from t_Category where CategoryId='" + cagegoryid + "'"; return(success = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int AddSubCategory(string categoryid, string subname, string subdescription, string images, string thumbnail) { try { int success = 0; success = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProAddSubCategory", new SqlParameter("@CategoryId", categoryid), new SqlParameter("@SubName", subname), new SqlParameter("@SubDescription", subdescription), new SqlParameter("@Image", images), new SqlParameter("@Thumbnail", thumbnail)); return(success); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int UpdateSubCategory(Int32 subcategoryid, string subname, Int32 categoryid) { try { int success = 0; success = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.StoredProcedure, "ProUpdateMiniCategory", new SqlParameter("@SubCategoryId", subcategoryid), new SqlParameter("@SubName", subname), new SqlParameter("@Categoryid", categoryid)); return(success); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int AddBrand(string brandname, string categoryid, string brandimage) { try { string query = "insert into t_Brand(Brandname, Categoryid, BrandImage) values('" + brandname + "','" + categoryid + "','" + brandimage + "')"; object intVal = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(Convert.ToInt32(intVal)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int UpdateQuantity(Int32 productid, string quantity) { try { string query = "Update t_Quantity set Quantity='" + quantity + "' where ProductId='" + productid + "'"; int result = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(result); } catch (Exception ex) { throw new Exception(ex.Message); } }
/********Sub sub category***************/ public int AddSubsubCategory(string categoryid, string subcategoryid, string subsubname) { try { string query = "insert into t_MiniCategory(CategoryId, SubCategoryId, MiniName) " + "values('" + categoryid + "','" + subcategoryid + "', '" + subsubname + "')"; return(MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query)); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int InsertIntoShoppingCart(string transid, Int32 productid, decimal price, string variantname, Int32 variantquantity, Int32 quantity, Int32 discount, decimal totalprice, Int32 shippingcharge, string productname, string thumbnail, string Capacity, Int32 userid, int flavour) { try { string query = "Insert into ShopingCart (TransId, ProductId, Price, VariantName, VariantQuantity, Quantity, Discount, TotalPrice, ShippingCharges, Name, Thumbnail, Capacity, UserId, Flavour) values('" + transid + "','" + productid + "','" + price + "','" + variantname + "', '" + variantquantity + "','" + quantity + "','" + discount + "','" + totalprice + "','" + shippingcharge + "','" + productname + "','" + thumbnail + "','" + Capacity + "','" + userid + "','" + flavour + "')"; int intVal; intVal = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(intVal); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteOrderDetails(Int32 orderid) { try { string query = "delete from t_OrderDetail where OrderId='" + orderid + "'"; int intvalue; intvalue = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(intvalue); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteCartItem(string transid, string cartid) { try { string query = @"Delete from ShopingCart WHERE TransId='" + transid + "' AND CartId='" + cartid + "'"; int value = 0; value = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(value); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteSubCategory(string subcategoryid) { try { int success = 0; string query = "Delete from t_MiniCategory where MenuCategoryId='" + subcategoryid + "'"; success = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(success); } catch (Exception ex) { throw new Exception(ex.Message); } }
public int DeleteWishItem(string WishId) { try { string query = @"delete from t_Wishlist WHERE WishId='" + WishId + "'"; int value = 0; value = MySqlDataAccess.ExecuteNonQuery(MySqlDataAccess.ConnectionString, CommandType.Text, query); return(value); } catch (Exception ex) { throw new Exception(ex.Message); } }