protected void lkbSave_Click(object sender, EventArgs e) { try { MST_DRIVER mST_DRIVER = new MST_DRIVER(); mST_DRIVER.DriverName = txtDriverName.Text.Trim(); mST_DRIVER.MoNo = txtMoNo.Text.Trim(); mST_DRIVER.OrgId = cls_Common.UserProfile.ORG_ID; bool isSave = _driver_DTO.Save(mST_DRIVER); if (isSave) { ClearItems(); ShowMessage("Driver saved Successfully..", true); RefreshDrivers(); } else { ShowMessage("Some error found..", false); } } catch (Exception ex) { throw ex; } }
public bool Delete(MST_DRIVER data) { try { unitOfWork.DriverRepository.Delete(data); unitOfWork.Save(); return(true); } catch (Exception ex) { return(false); } }
public cls_Driver_DTO(int driverId) { unitOfWork = new UnitOfWork(); _getDriver = Get_DRIVER(driverId); }