Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
 public bool Delete(MST_DRIVER data)
 {
     try
     {
         unitOfWork.DriverRepository.Delete(data);
         unitOfWork.Save();
         return(true);
     }
     catch (Exception ex)
     { return(false); }
 }
Ejemplo n.º 3
0
 public cls_Driver_DTO(int driverId)
 {
     unitOfWork = new UnitOfWork();
     _getDriver = Get_DRIVER(driverId);
 }