public override bool Equals(object obj) { PriceListMaster another = obj as PriceListMaster; if (another == null) { return(false); } else { return(this.Code == another.Code); } }
public ActionResult New(PriceListMaster priceListMaster) { if (ModelState.IsValid) { if (this.genericMgr.FindAll<long>(duiplicateVerifyStatement, new object[] { priceListMaster.Code })[0] > 0) { SaveErrorMessage(Resources.SYS.ErrorMessage.Errors_Existing_Code, priceListMaster.Code); } else { if (this.genericMgr.FindAll<Customer>("from Customer where Code=?", priceListMaster.Party).Count < 1) { SaveErrorMessage(Resources.BIL.PriceListMaster.Errors_NotExisting_Party); } else { priceListMaster.Type = com.Sconit.CodeMaster.PriceListType.Distribution; this.genericMgr.CreateWithTrim(priceListMaster); SaveSuccessMessage(Resources.BIL.PriceListMaster.PriceListMaster_Added); return RedirectToAction("Edit/" + priceListMaster.Code); } } } return View(priceListMaster); }
public ActionResult _Edit(PriceListMaster priceListMaster) { if (ModelState.IsValid) { priceListMaster.Type = com.Sconit.CodeMaster.PriceListType.Distribution; this.genericMgr.UpdateWithTrim(priceListMaster); SaveSuccessMessage(Resources.BIL.PriceListMaster.PriceListMaster_Updated); } return PartialView(priceListMaster); }
public ActionResult _Edit(PriceListMaster priceListMaster) { if (ModelState.IsValid) { priceListMaster.Type = com.Sconit.CodeMaster.PriceListType.Procuement; base.genericMgr.Update(priceListMaster); SaveSuccessMessage(Resources.BIL.PriceListMaster.PriceListMaster_Updated); } return PartialView(priceListMaster); }