Esempio n. 1
0
        public void Create(ERP_C005_Employee tb_C005_Employee)
        {
            tb_C005_Employee.CreateDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_C005_Employee.CreateUser = tempUser.UserName;
            tb_C005_Employee.CompCode   = tempUser.CompCode;
            tb_C005_Employee.Validate();
            this.tb_C005_EmployeeRepository.Add(tb_C005_Employee);
            this.runtimeService.Commit();
        }
Esempio n. 2
0
        public void Update(ERP_C005_Employee tb_C005_Employee)
        {
            tb_C005_Employee.ModifyDt = DateTime.Now;
            tb_Sys_User tempUser = appCacheService.GetItem("user") as tb_Sys_User;

            tb_C005_Employee.ModifyUser = tempUser.UserName;
            tb_C005_Employee.Validate();
            var existstb_Sys_Menu = this.Gettb_C005_EmployeeById(tb_C005_Employee.Id);

            this.tb_C005_EmployeeRepository.SetValues(tb_C005_Employee, existstb_Sys_Menu);
            this.runtimeService.Commit();
        }
Esempio n. 3
0
        private void OpenForm(string formText, string btnCommand)
        {
            ERP_C005_Employee temp = eRPC005EmployeeBindingSource.Current as ERP_C005_Employee;
            EmployeeEditForm  edit = new EmployeeEditForm(temp);

            edit.Text = formText;
            edit.Tag  = btnCommand;
            if (edit.ShowDialog() != DialogResult.OK)
            {
                eRPC005EmployeeBindingSource.CancelEdit();
                InitData();
            }
        }
Esempio n. 4
0
 public override void OnBtnCommand(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (e.Item.Caption == BtnCommandEnum.Add)
     {
         eRPC005EmployeeBindingSource.AddNew();
         OpenForm("员工资料新增", BtnCommandEnum.Add);
     }
     else if (e.Item.Caption == BtnCommandEnum.Edit)
     {
         OpenForm("员工资料修改", BtnCommandEnum.Edit);
     }
     else if (e.Item.Caption == BtnCommandEnum.Delete)
     {
         if (ERPHelper.Instance.MessageDel())
         {
             ERP_C005_Employee temp = eRPC005EmployeeBindingSource.Current as ERP_C005_Employee;
             employeeService.Delete(temp.Id);
             //eRPC003CustomerBindingSource.RemoveCurrent();
         }
     }
 }
Esempio n. 5
0
 public EmployeeEditForm(ERP_C005_Employee tempData)
 {
     InitializeComponent();
     //this.customerService = customerService;
     eRPC005EmployeeBindingSource.DataSource = tempData;
 }