public async Task <DataSet> Pasaload(string mobileNumberFrom, String mobileNumberTo, string Amount) { CommonRepository common = new CommonRepository(); return(await common.WebClockingSave("", mobileNumberFrom, Amount, "Pasaload", "", mobileNumberTo)); }
public async Task <DataSet> Unreg(string ClubName, string mobileNumber, string keyword, string DBName, string UserID) { CommonRepository common = new CommonRepository(); return(await common.WebClockingSave(ClubName, mobileNumber, keyword, "Unreg", UserID)); }
public ServiceRes AddProduct(ProductDetails objProduct) { ServiceRes serviceRes = new ServiceRes(); try { if (objProduct != null) { ICommonRepository _commonRepository = new CommonRepository(); string fileLocation = _commonRepository.Base64toImage(objProduct.ImagePath, "Images", "ProductImages", "ProductPhoto"); SqlParameter[] sqlParameters = new SqlParameter[13]; sqlParameters[0] = new SqlParameter { ParameterName = "@Name", Value = objProduct.Name }; sqlParameters[1] = new SqlParameter { ParameterName = "@SKUNumber", Value = objProduct.SKUNumber }; sqlParameters[2] = new SqlParameter { ParameterName = "@Specification", Value = objProduct.Specification }; sqlParameters[3] = new SqlParameter { ParameterName = "@Price", Value = objProduct.Price }; sqlParameters[4] = new SqlParameter { ParameterName = "@IsPackaging", Value = objProduct.IsPackaging }; sqlParameters[5] = new SqlParameter { ParameterName = "@IsAvailable", Value = objProduct.IsAvailable }; sqlParameters[6] = new SqlParameter { ParameterName = "@Discount", Value = objProduct.Discount }; sqlParameters[7] = new SqlParameter { ParameterName = "@Category_Id", Value = objProduct.CategoryId }; sqlParameters[8] = new SqlParameter { ParameterName = "@SubCategory_Id", Value = objProduct.SubCategoryId }; sqlParameters[9] = new SqlParameter { ParameterName = "@Quantity", Value = objProduct.Quantity }; sqlParameters[10] = new SqlParameter { ParameterName = "@Photos_Url", Value = fileLocation }; sqlParameters[11] = new SqlParameter { ParameterName = "@Member_Id", Value = objProduct.UserId }; sqlParameters[12] = new SqlParameter { ParameterName = "@flag", Value = "A" }; int returnValue = SqlHelper.ExecuteNonQuery("Usp_Products_Test", sqlParameters); if (returnValue > 0) { serviceRes.IsSuccess = true; serviceRes.ReturnCode = "200"; serviceRes.ReturnMsg = "Product added successfully"; } else { serviceRes.IsSuccess = false; serviceRes.ReturnCode = "400"; serviceRes.ReturnMsg = "Something went wrong"; } } } catch (Exception ex) { LogManager.WriteLog(ex); serviceRes.IsSuccess = false; serviceRes.ReturnCode = "400"; serviceRes.ReturnMsg = "Error occured in database"; } return(serviceRes); }