public APIResponse UpdatePrice(PriceMaster priceMaster) { APIResponse response = new APIResponse(); try { response.Data = priceManager.UpdatePrice(priceMaster); if (response.Data != 0) { response.Success = true; response.Error = null; } else { response.Success = false; response.Error = "Record not Updated"; } } catch (Exception ex) { response.Data = null; response.Success = false; response.Error = ex.Message; } return(response); }
public void EditPrice_Master(PriceMaster priceMaster, string username, string password) { PriceMaster prce_Mstr = context.PriceMaster.FirstOrDefault(a => a.PriceMasterCode == priceMaster.PriceMasterCode); prce_Mstr.ConversitionRate = priceMaster.ConversitionRate; prce_Mstr.CurrencyType = priceMaster.CurrencyType; prce_Mstr.UnitPrice = priceMaster.UnitPrice; prce_Mstr.ModifiedBy = username; prce_Mstr.ModifiedDate = DateTime.Now; context.SaveChanges(); }
public int UpdatePrice(PriceMaster priceMaster) { int result = 0; try { string query = string.Format("update PriceMaster set ItemId={0},Price={1} where PriceId={2}", priceMaster.ItemId, priceMaster.Price, priceMaster.PriceId); result = _db.Execute(query); } catch (Exception EX) { throw EX; } return(result); }
public PriceMaster SinglePriceMaster(int priceid) { PriceMaster priceMaster = new PriceMaster(); try { string query = string.Format("select * from PriceMaster where PriceId={0}", priceid); priceMaster = _db.Query <PriceMaster>(query).FirstOrDefault(); } catch (Exception) { throw; } return(priceMaster); }
public int InsertPrice(PriceMaster priceMaster) { int result = 0; try { string query = string.Format("insert into PriceMaster (ItemId,Price,Date) values({0},{1})", priceMaster.ItemId, priceMaster.Price); result = _db.Execute(query); } catch (Exception EX) { throw EX; } return(result); }
public int UpdatePrice(PriceMaster priceMaster) { return(priceRepository.UpdatePrice(priceMaster)); }
public int InsertPrice(PriceMaster priceMaster) { return(priceRepository.InsertPrice(priceMaster)); }
public void EditPrice_Master(PriceMaster priceMaster, string username, string password) { masterReports.EditPrice_Master(priceMaster, username, password); }