public DepartmentManagement Add(DepartmentManagement data)
 {
     DepartmentManagementDAO.Add(data);
     return data;
 }
 public void Delete(DepartmentManagement data)
 {
     DepartmentManagementDAO.Delete(data);
 }
Esempio n. 3
0
 public virtual bool Equals(DepartmentManagement other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other.DepartmentManagementPK, DepartmentManagementPK);
 }
 public void Update(DepartmentManagement data)
 {
     DepartmentManagementDAO.Update(data);
 }
Esempio n. 5
0
 void mainView_StartPeriodEvent(object sender, EmployeeManagementEventArgs e)
 {
     try
     {
         DepartmentManagement dm = new DepartmentManagement();
         dm.CreateId = e.UserInfo.Username;
         dm.UpdateId = e.UserInfo.Username;
         dm.CreateDate = DateTime.Now;
         dm.UpdateDate = DateTime.Now;
         dm.StartTime = DateTime.Now;
         dm.DepartmentManagementPK = new DepartmentManagementPK
                                         {
                                             DepartmentId = CurrentDepartment.Get().DepartmentId,
                                             EmployeeId = e.UserInfo.EmployeeInfo.EmployeePK.EmployeeId,
                                             WorkingDay = DateTime.Now
                                         };
         DepartmentManagementLogic.Add(dm);
         e.DepartmentManagement = dm;
     }
     catch (Exception)
     {
         e.HasErrors = true;
     }
 }
 /// <summary>
 /// Delete DepartmentManagement from database.
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public void Delete(DepartmentManagement data)
 {
     HibernateTemplate.Delete(data);
 }
 /// <summary>
 /// Add DepartmentManagement to database.
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public DepartmentManagement Add(DepartmentManagement data)
 {
     HibernateTemplate.Save(data);
     return data;
 }
 /// <summary>
 /// Update DepartmentManagement to database.
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public void Update(DepartmentManagement data)
 {
     HibernateTemplate.Update(data);
 }
Esempio n. 9
0
 void mainView_StartPeriodEvent(object sender, MainLogicEventArgs e)
 {
     DepartmentManagement dm = new DepartmentManagement();
     dm.CreateId = e.UserInfo.Username;
     dm.UpdateId = e.UserInfo.Username;
     dm.CreateDate = DateTime.Now;
     dm.UpdateDate = DateTime.Now;
     dm.StartTime = DateTime.Now;
     dm.DepartmentManagementPK = new DepartmentManagementPK
                                     {
                                         DepartmentId = CurrentDepartment.Get().DepartmentId,
                                         EmployeeId = e.UserInfo.EmployeeInfo.EmployeePK.EmployeeId,
                                         WorkingDay = DateTime.Now
                                     };
     DepartmentManagementLogic.Add(dm);
 }