예제 #1
0
    public ActionResult Details(int?id)
    {
        if (id == null)
        {
            return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
        }
        LedgerRemarkMaster getMaster = _uow.LedgerRemarkMasterRepository.GetByID(id);

        if (getMaster == null)
        {
            return(HttpNotFound());
        }
        return(View(getMaster));
    }
예제 #2
0
    public string Delete(int id)
    {
        string msg = "";

        try
        {
            LedgerRemarkMaster objMaster = _uow.LedgerRemarkMasterRepository.GetByID(id);
            _uow.LedgerRemarkMasterRepository.Delete(id);
            _uow.Save();
            msg = "Deleted Successfully";
        }
        catch (Exception ex)
        {
            msg = "Error While Processing the Request " + ex.Message;
        }
        return(msg);
    }
예제 #3
0
    public string Edit([Bind(Include = "ID,Name,Description")] LedgerRemarkMaster objMaster)
    {
        string msg = "";

        try
        {
            if (ModelState.IsValid)
            {
                _uow.LedgerRemarkMasterRepository.Update(objMaster);
                _uow.Save();
                msg = "Updated Successully";
            }
            else
            {
                msg = "Update Validation Error";
            }
        }
        catch (Exception ex)
        {
            msg = "Error while Processing the Request " + ex.Message;
        }
        return(msg);
    }