private void RaiseSuccessEventHander(HRM_BRANCH item) { if (this.Success != null) { this.Success(this, item); } }
public void RaiseUpdatedEventHander(HRM_BRANCH Item) { if (this.Updated != null) { this.Updated(this, Item); } }
private void LoadDepartment() { if (this.m_Level == 0) { this.txtDepartment.Text = ""; } else if (this.m_Level == 1) { HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); hRMBRANCH.Get(this.m_Code); this.txtDepartment.Text = string.Concat("Đơn vị: ", hRMBRANCH.BranchName); } else if (this.m_Level == 2) { HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); hRMDEPARTMENT.Get(this.m_Code); this.txtDepartment.Text = string.Concat("Đơn vị: ", hRMDEPARTMENT.DepartmentName); } else if (this.m_Level == 3) { HRM_GROUP hRMGROUP = new HRM_GROUP(); hRMGROUP.Get(this.m_Code); this.txtDepartment.Text = string.Concat("Đơn vị: ", hRMGROUP.GroupName); } }
private void frm_Added(object sender, HRM_BRANCH Item) { TreeListNode treeListNode; object[] branchCode; if (!(Item.SubsidiaryCode != "")) { TreeList treeList = this.treeList1; branchCode = new object[] { Item.BranchCode, string.Concat(Item.BranchName, this.StringQuantity(0, 0)), "All", "Branch", 0, 0, 2 }; treeListNode = treeList.AppendNode(branchCode, this.treeList1.Nodes.FirstNode); this.treeList1.SetFocusedNode(treeListNode); } else { foreach (TreeListNode node in this.treeList1.Nodes.FirstNode.Nodes) { if (node.GetValue("ID").ToString() == Item.SubsidiaryCode) { TreeList treeList1 = this.treeList1; branchCode = new object[] { Item.BranchCode, string.Concat(Item.BranchName, this.StringQuantity(0, 0)), Item.SubsidiaryCode, "Branch", 0, 0, 2 }; treeListNode = treeList1.AppendNode(branchCode, node); this.treeList1.SetFocusedNode(treeListNode); } } } }
protected override string uc_Update() { string str; if (MyRule.Get(MyLogin.RoleId, "bbiBranch") != "OK") { str = ""; } else if (MyRule.AllowEdit) { // SYS_LOG.Insert("Danh Sách Chi Nhánh", "Cập Nhật", this.txtID.Text); base.SetWaitDialogCaption("Đang cập nhật dữ liệu..."); HRM_BRANCH hRMBRANCH = this.InitClass(); string str1 = hRMBRANCH.Update(); if (str1 == "OK") { this.RaiseSuccessEventHander(hRMBRANCH); } if (str1 != "OK") { XtraMessageBox.Show(str1, "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } this.DoHide(); str = str1; } else { MyRule.Notify(); str = ""; } return(str); }
public override void Change() { if (!(MyRule.Get(MyLogin.RoleId, "bbiBranch") != "OK")) { if (MyRule.AllowAccess) { HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); object cellValue = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "BranchCode"); if (cellValue != null) { base.SetWaitDialogCaption("Đang kiểm tra dữ liệu...."); if (!(hRMBRANCH.Get(cellValue.ToString()) != "OK")) { this.DoHide(); xfmBranchAdd _xfmBranchAdd = new xfmBranchAdd(Actions.Update, hRMBRANCH); _xfmBranchAdd.Updated += new xfmBranchAdd.UpdatedEventHander(this.frm_Updated); _xfmBranchAdd.Added += new xfmBranchAdd.AddedEventHander(this.frm_Added); _xfmBranchAdd.ShowDialog(); } else { this.DoHide(); XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } } else { MyRule.Notify(); } } }
private void glkEmployeeCode_EditValueChanged(object sender, EventArgs e) { HRM_EMPLOYEE hRMEMPLOYEE = new HRM_EMPLOYEE(); hRMEMPLOYEE.Get(this.glkEmployeeCode.EditValue.ToString()); this.txtEmployeeName.Text = string.Concat(hRMEMPLOYEE.FirstName, " ", hRMEMPLOYEE.LastName); this.xdeBirthday.Day = hRMEMPLOYEE.BirthdayDay; this.xdeBirthday.Month = hRMEMPLOYEE.BirthdayMonth; this.xdeBirthday.Year = hRMEMPLOYEE.BirthdayYear; this.txtPosition.Text = hRMEMPLOYEE.Position; this.txtNationality1.Text = hRMEMPLOYEE.Nationality; this.txtIDCard.Text = hRMEMPLOYEE.IDCard; this.dtIDCardDate.DateTime = hRMEMPLOYEE.IDCardDate; this.txtIDCardPlace.Text = hRMEMPLOYEE.IDCardPlace; HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); hRMBRANCH.Get(hRMEMPLOYEE.BranchCode); HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); hRMDEPARTMENT.Get(hRMEMPLOYEE.DepartmentCode); this.txtDepartment.Text = string.Concat(hRMBRANCH.BranchName, " - ", hRMDEPARTMENT.DepartmentName); this.calBasicSalary.EditValue = hRMEMPLOYEE.BasicSalary; foreach (DataRow row in (new HRM_EMPLOYEE_ALLOWANCE()).GetList(hRMEMPLOYEE.EmployeeCode).Rows) { this.txtAllowance.Text = string.Concat(this.txtAllowance.Text, row["AllowanceName"].ToString(), "; "); } if (this.glkEmployeeCode.ErrorText != string.Empty) { this.Err.SetError(this.glkEmployeeCode, string.Empty); } }
protected override void Add() { base.Add(); HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); this.txtID.Text = hRMBRANCH.NewID(); this.txtNAME.Focus(); }
public xfmBranchAdd(Actions Action) { this.InitializeComponent(); this.Init(); this.ucAdd.Status = Action; HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); this.ucAdd.SetData(hRMBRANCH.NewID()); this.Text = string.Concat("Thêm ", this.Text); }
private void frm_Updated(object sender, HRM_BRANCH Item) { TreeListNode focusedNode = this.treeList1.FocusedNode; if (!(Item.SubsidiaryCode != focusedNode.GetValue("ParentID").ToString())) { focusedNode.SetValue("Name", string.Concat(Item.BranchName, this.StringQuantity(int.Parse(focusedNode.GetValue("FactQuantity").ToString()), int.Parse(focusedNode.GetValue("Quantity").ToString())))); } else { this.Reload(); } }
private void glkSubsidiary_EditValueChanged(object sender, EventArgs e) { HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); if ((this.glkSubsidiary.EditValue == null ? false : !(this.glkSubsidiary.Text == ""))) { this.glkBranch.Properties.DataSource = hRMBRANCH.GetListBySubsidiary(this.glkSubsidiary.EditValue.ToString()); } else { this.glkBranch.Properties.DataSource = hRMBRANCH.GetList(); } }
protected override string uc_Delete() { HRM_BRANCH hRMBRANCH = new HRM_BRANCH() { BranchCode = this.txtID.Text }; string str = hRMBRANCH.Delete(); if (str == "OK") { this.RaiseSuccessEventHander(hRMBRANCH); } return(str); }
public xfmBranchAdd(Actions Action, HRM_BRANCH Item) { this.InitializeComponent(); this.Init(); this.ucAdd.Status = Action; if (Action == Actions.Update) { this.ucAdd.SetData(Item); this.Text = string.Concat("Cập Nhật ", this.Text); } else if (Action == Actions.Delete) { this.ucAdd.SetData(Item.BranchCode); } }
private void UpdateRow(HRM_BRANCH item, RowClickEventArgs e) { AdvBandedGridView advBandedGridView = this.gbList; int rowIndex = e.RowIndex; advBandedGridView.SetRowCellValue(rowIndex, "BranchCode", item.BranchCode); advBandedGridView.SetRowCellValue(rowIndex, "BranchName", item.BranchName); advBandedGridView.SetRowCellValue(rowIndex, "Address", item.Address); advBandedGridView.SetRowCellValue(rowIndex, "Phone", item.Phone); advBandedGridView.SetRowCellValue(rowIndex, "Fax", item.Fax); advBandedGridView.SetRowCellValue(rowIndex, "PersonName", item.PersonName); advBandedGridView.SetRowCellValue(rowIndex, "Quantity", item.Quantity); advBandedGridView.SetRowCellValue(rowIndex, "Description", item.Description); advBandedGridView.UpdateCurrentRow(); }
private void ucAdd_Success(object sender, HRM_BRANCH Item) { if (this.ucAdd.Status == Actions.Add) { this.RaiseAddedEventHander(Item); } else if (this.ucAdd.Status == Actions.Update) { this.RaiseUpdatedEventHander(Item); } if (this.ucAdd.IsClose == CloseOrNew.Close) { base.Close(); } this.ucAdd.Clear(); }
private void AddRow(HRM_BRANCH Item) { AdvBandedGridView advBandedGridView = this.gbList; int focusedRowHandle = advBandedGridView.FocusedRowHandle; advBandedGridView.AddNewRow(); focusedRowHandle = advBandedGridView.FocusedRowHandle; advBandedGridView.SetRowCellValue(focusedRowHandle, "BranchCode", Item.BranchCode); advBandedGridView.SetRowCellValue(focusedRowHandle, "BranchName", Item.BranchName); advBandedGridView.SetRowCellValue(focusedRowHandle, "Address", Item.Address); advBandedGridView.SetRowCellValue(focusedRowHandle, "Phone", Item.Phone); advBandedGridView.SetRowCellValue(focusedRowHandle, "Fax", Item.Fax); advBandedGridView.SetRowCellValue(focusedRowHandle, "PersonName", Item.PersonName); advBandedGridView.SetRowCellValue(focusedRowHandle, "Quantity", Item.Quantity); advBandedGridView.SetRowCellValue(focusedRowHandle, "Description", Item.Description); advBandedGridView.UpdateCurrentRow(); }
private HRM_BRANCH InitClass() { HRM_BRANCH hRMBRANCH = new HRM_BRANCH() { BranchCode = this.txtID.Text, SubsidiaryCode = (this.glkSubsidiary.EditValue == null ? "" : this.glkSubsidiary.EditValue.ToString()), BranchName = this.txtNAME.Text, Address = this.txtAddress.Text, Phone = this.txtPhone.Text, Fax = this.txtFax.Text, MinimumSalary = decimal.Parse(this.calMinimumSalary.EditValue.ToString()), PersonName = this.txtPersonName.Text, Quantity = int.Parse(this.txtQuantity.Text), Description = this.txtDescription.Text }; return(hRMBRANCH); }
public void SetData(HRM_BRANCH item) { this.txtID.Text = item.BranchCode; // SYS_LOG.Insert("Danh Sách Chi Nhánh", "Xem", this.txtID.Text); if (this.m_Status == Actions.Update) { this.txtID.Properties.ReadOnly = true; } this.glkSubsidiary.EditValue = item.SubsidiaryCode; this.txtNAME.Text = item.BranchName; this.txtAddress.Text = item.Address; this.txtPhone.Text = item.Phone; this.txtFax.Text = item.Fax; this.calMinimumSalary.EditValue = item.MinimumSalary; this.txtPersonName.Text = item.PersonName; this.txtQuantity.Text = item.Quantity.ToString(); this.txtFactQuantity.Text = item.FactQuantity.ToString(); this.txtDescription.Text = item.Description; }
protected override void txtID_KeyDown(object sender, KeyEventArgs e) { TextEdit textEdit = (TextEdit)sender; if (e.KeyCode == Keys.Return | e.KeyCode == Keys.Tab) { HRM_SUBSIDIARY hRMSUBSIDIARY = new HRM_SUBSIDIARY(); HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); HRM_GROUP hRMGROUP = new HRM_GROUP(); if (this.m_Status == Actions.Add) { if ((hRMBRANCH.Exist(textEdit.Text) || hRMSUBSIDIARY.Exist(textEdit.Text) || hRMDEPARTMENT.Exist(textEdit.Text) ? true : hRMGROUP.Exist(textEdit.Text))) { this.Err.SetError(textEdit, "Mã đã tồn tại."); textEdit.Focus(); } } } }
private void txtID_EditValueChanged(object sender, EventArgs e) { TextEdit textEdit = (TextEdit)sender; if (textEdit.ErrorText != string.Empty) { this.Err.SetError(textEdit, string.Empty); } HRM_SUBSIDIARY hRMSUBSIDIARY = new HRM_SUBSIDIARY(); HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); HRM_GROUP hRMGROUP = new HRM_GROUP(); if (this.m_Status == Actions.Add) { if ((hRMBRANCH.Exist(textEdit.Text) || hRMSUBSIDIARY.Exist(textEdit.Text) || hRMDEPARTMENT.Exist(textEdit.Text) ? true : hRMGROUP.Exist(textEdit.Text))) { this.Err.SetError(textEdit, "Mã đã tồn tại."); textEdit.Focus(); } } }
protected override string uc_Save() { string str; if (MyRule.Get(MyLogin.RoleId, "bbiBranch") != "OK") { str = ""; } else if (!MyRule.AllowAdd) { MyRule.Notify(); str = ""; } else if (MyLogin.Level <= 1) { // SYS_LOG.Insert("Danh Sách Chi Nhánh", "Thêm", this.txtID.Text); base.SetWaitDialogCaption("Đang lưu dữ liệu..."); Cursor.Current = Cursors.WaitCursor; HRM_BRANCH hRMBRANCH = this.InitClass(); string str1 = hRMBRANCH.Insert(); if (str1 == "OK") { this.RaiseSuccessEventHander(hRMBRANCH); } Cursor.Current = Cursors.Default; this.DoHide(); if (str1 != "OK") { XtraMessageBox.Show(str1, "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } str = str1; } else { XtraMessageBox.Show("Cấp độ quản lý của bạn không được phép thêm chi nhánh!", "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); str = ""; } return(str); }
// protected override void Print() //{ // if (!(MyRule.Get(MyLogin.RoleId, "bbiBranch") != "OK")) // { // if (MyRule.AllowPrint) // { // SYS_LOG.Insert("Danh Sách Chi Nhánh", "In"); // (new xfmReport("Danh Sách Chi Nhánh")).ShowPrintPreview(this.gcList); // base.Print(); // } // else // { // MyRule.Notify(); // } // } //} public override void ReLoad() { base.SetWaitDialogCaption("Đang nạp dữ liệu..."); HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); this.gcList.DataSource = hRMBRANCH.GetList(); base.SetWaitDialogCaption("Đang nạp cấu hình..."); this.List_Init(this.gbList); base.SetWaitDialogCaption("Nạp quyền sử dụng..."); MyRule.Get(MyLogin.RoleId, "bbiBranch"); if (!MyRule.AllowPrint) { this.ucToolBar.bbiPrint.Visibility = BarItemVisibility.Never; } MyRule.Get(MyLogin.RoleId, "bbiBranch"); if (!MyRule.AllowExport) { this.ucToolBar.bbiExport.Visibility = BarItemVisibility.Never; } MyRule.Get(MyLogin.RoleId, "bbiBranch"); if (!MyRule.AllowAdd) { this.ucToolBar.bbiAdd.Visibility = BarItemVisibility.Never; } MyRule.Get(MyLogin.RoleId, "bbiBranch"); if (!MyRule.AllowDelete) { this.ucToolBar.bbiDelete.Visibility = BarItemVisibility.Never; } MyRule.Get(MyLogin.RoleId, "bbiBranch"); if (!MyRule.AllowEdit) { this.ucToolBar.bbiEdit.Visibility = BarItemVisibility.Never; } base.SetWaitDialogCaption("Đã xong..."); this.DoHide(); }
public override void Delete() { object cellValue; if (!(MyRule.Get(MyLogin.RoleId, "bbiBranch") != "OK")) { if (MyRule.AllowDelete) { if (ClsOption.System2.IsQuestion) { if (XtraMessageBox.Show("Bạn có muốn xóa không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } } base.SetWaitDialogCaption("Đang xóa..."); string str = ""; bool flag = false; AdvBandedGridView advBandedGridView = this.gbList; int[] selectedRows = advBandedGridView.GetSelectedRows(); HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); for (int i = (int)selectedRows.Length; i > 0; i--) { flag = true; cellValue = base.GetCellValue(selectedRows[i - 1], "BranchCode"); if (cellValue != null) { //SYS_LOG.Insert("Danh Sách Chi Nhánh", "Xoá", cellValue.ToString()); str = hRMBRANCH.Delete(cellValue.ToString()); if (str == "OK") { advBandedGridView.DeleteRow(selectedRows[i - 1]); } else if (str != "OK") { MessageBox.Show(string.Concat("Thông tin không được xóa\n", str), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Hand); } } } this.DoHide(); if (!flag) { if (advBandedGridView.DataSource != null) { RowClickEventArgs rowClickEventArg = new RowClickEventArgs((advBandedGridView == null ? -1 : advBandedGridView.FocusedRowHandle), (advBandedGridView.FocusedColumn == null ? -1 : advBandedGridView.FocusedColumn.ColumnHandle), (advBandedGridView.FocusedColumn == null ? "" : advBandedGridView.FocusedColumn.FieldName)); this.m_RowClickEventArgs = rowClickEventArg; cellValue = null; cellValue = base.GetCellValue(rowClickEventArg.RowIndex, "BranchCode"); if (cellValue != null) { // SYS_LOG.Insert("Danh Sách Chi Nhánh", "Xoá", cellValue.ToString()); base.SetWaitDialogCaption("Đang xóa..."); str = hRMBRANCH.Delete(cellValue.ToString()); if (str == "OK") { advBandedGridView.DeleteRow(rowClickEventArg.RowIndex); } else if (str != "OK") { MessageBox.Show(string.Concat("Thông tin không được xóa\n", str), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Hand); } this.DoHide(); } } } } else { // MyRule.Notify(); } } }
private void LoadTreeList(int Level, string Code) { object[] mCompanyName; //if (MyInfo.GetInfo() == "OK") //{ // this.m_CompanyName = MyInfo.Company; //} this.m_CompanyName = "Công ty ABC"; this.dt = new DataTable(); this.dt.Columns.Add("ID"); this.dt.Columns.Add("Name"); this.dt.Columns.Add("ParentID"); this.dt.Columns.Add("Type"); this.dt.Columns.Add("FactQuantity"); this.dt.Columns.Add("Quantity"); this.dt.Columns.Add("ImageIndex"); if (Level == 0) { DataRowCollection rows = this.dt.Rows; mCompanyName = new object[] { "All", this.m_CompanyName, "", "Company", 0, 0, 0 }; rows.Add(mCompanyName); this.m_CompanyFactQuantity = 0; this.m_CompanyQuantity = 0; this.AddSubsidiaryToDataTable(this.dt); this.AddBranchNullToDataTable(this.dt); this.AddDepartmentNullToDataTable(this.dt); this.dt.Rows[0]["Name"] = string.Concat(this.dt.Rows[0]["Name"].ToString(), this.StringQuantity(this.m_CompanyFactQuantity, this.m_CompanyQuantity)); this.dt.Rows[0]["FactQuantity"] = this.m_CompanyFactQuantity; this.dt.Rows[0]["Quantity"] = this.m_CompanyQuantity; } else if (Level == 1) { HRM_SUBSIDIARY hRMSUBSIDIARY = new HRM_SUBSIDIARY(); hRMSUBSIDIARY.Get(Code); DataRowCollection dataRowCollection = this.dt.Rows; mCompanyName = new object[] { hRMSUBSIDIARY.SubsidiaryCode, string.Concat(hRMSUBSIDIARY.SubsidiaryName, this.StringQuantity(hRMSUBSIDIARY.FactQuantity, hRMSUBSIDIARY.Quantity)), "", "Subsidiary", hRMSUBSIDIARY.FactQuantity, hRMSUBSIDIARY.Quantity, 1 }; dataRowCollection.Add(mCompanyName); this.AddBranchToDataTable(hRMSUBSIDIARY.SubsidiaryCode, this.dt); this.AddDepartmentBySubsidiaryNotNullToDataTable(hRMSUBSIDIARY.SubsidiaryCode, this.dt); } else if (Level == 2) { HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); hRMBRANCH.Get(Code); DataRowCollection rows1 = this.dt.Rows; mCompanyName = new object[] { hRMBRANCH.BranchCode, string.Concat(hRMBRANCH.BranchName, this.StringQuantity(hRMBRANCH.FactQuantity, hRMBRANCH.Quantity)), "", "Branch", hRMBRANCH.FactQuantity, hRMBRANCH.Quantity, 2 }; rows1.Add(mCompanyName); this.AddDepartmentByBranchToDataTable(hRMBRANCH.BranchCode, this.dt); } else if (Level == 3) { HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); hRMDEPARTMENT.Get(Code); DataRowCollection dataRowCollection1 = this.dt.Rows; mCompanyName = new object[] { hRMDEPARTMENT.DepartmentCode, string.Concat(hRMDEPARTMENT.DepartmentName, this.StringQuantity(hRMDEPARTMENT.FactQuantity, hRMDEPARTMENT.Quantity)), "", "Department", hRMDEPARTMENT.FactQuantity, hRMDEPARTMENT.Quantity, 3 }; dataRowCollection1.Add(mCompanyName); this.AddGroupToDataTable(hRMDEPARTMENT.DepartmentCode, this.dt); } else if (Level == 4) { HRM_GROUP hRMGROUP = new HRM_GROUP(); hRMGROUP.Get(Code); DataRowCollection rows2 = this.dt.Rows; mCompanyName = new object[] { hRMGROUP.GroupCode, string.Concat(hRMGROUP.GroupName, this.StringQuantity(hRMGROUP.FactQuantity, hRMGROUP.Quantity)), "", "Group", hRMGROUP.FactQuantity, hRMGROUP.Quantity, 4 }; rows2.Add(mCompanyName); } this.treeList1.DataSource = this.dt; this.treeList1.ExpandAll(); }
private void glk_ButtonClick(object sender, ButtonPressedEventArgs e) { string name; if (e.Button.Kind == ButtonPredefines.Plus) { name = (sender as GridLookUpEdit).Name; if (name != null) { if (name == "glkSubsidiary") { xfmSubsidiaryAdd _xfmSubsidiaryAdd = new xfmSubsidiaryAdd(Actions.Add); _xfmSubsidiaryAdd.Added += new xfmSubsidiaryAdd.AddedEventHander((object s, HRM_SUBSIDIARY i) => (new HRM_SUBSIDIARY()).AddGridLookupEdit(this.glkSubsidiary)); _xfmSubsidiaryAdd.ShowDialog(); goto Label2; } else if (name == "glkBranch") { xfmBranchAdd _xfmBranchAdd = new xfmBranchAdd(Actions.Add); _xfmBranchAdd.Added += new xfmBranchAdd.AddedEventHander((object s, HRM_BRANCH i) => { HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); if ((this.glkSubsidiary.EditValue == null ? false : !(this.glkSubsidiary.Text == ""))) { this.glkBranch.Properties.DataSource = hRMBRANCH.GetListBySubsidiary(this.glkSubsidiary.EditValue.ToString()); } else { this.glkBranch.Properties.DataSource = hRMBRANCH.GetList(); } }); _xfmBranchAdd.ShowDialog(); goto Label2; } else { if (name != "glkDepartment") { goto Label2; } xfmDepartmentAdd _xfmDepartmentAdd = new xfmDepartmentAdd(Actions.Add); _xfmDepartmentAdd.Added += new xfmDepartmentAdd.AddedEventHander((object s, HRM_DEPARTMENT i) => { HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); if ((this.glkBranch.EditValue == null ? false : !(this.glkBranch.Text == ""))) { hRMDEPARTMENT.AddGridLookupEdit(this.glkDepartment, this.glkBranch.EditValue.ToString()); } else { this.glkDepartment.Properties.DataSource = hRMDEPARTMENT.GetList(); } }); _xfmDepartmentAdd.ShowDialog(); goto Label2; } } Label2 :; } else if (e.Button.Kind == ButtonPredefines.Delete) { name = (sender as GridLookUpEdit).Name; if (name != null) { if (name == "glkSubsidiary") { this.glkSubsidiary.EditValue = null; goto Label0; } else if (name == "glkBranch") { this.glkBranch.EditValue = null; goto Label0; } else { if (name != "glkDepartment") { goto Label0; } this.glkDepartment.EditValue = null; goto Label0; } } Label0 :; } }
private void LoadOrganization() { this.xucListContractEmployee1.LoadData(1); this.xucListContractEmployee1.EmployeeSelected += new xucListContractEmployee.EmployeeSelectedHandler((object s, string e) => { int num = 5; int num1 = num; this.m_Level = num; string str = e; string str1 = str; this.m_Code = str; this.LoadGrid(num1, str1); }); this.xucListContractEmployee1.DepartmentSelected += new xucListContractEmployee.DepartmentSelectedHandler((object s, Organization o) => { int num; string str; HRM_GROUP hRMGROUP = new HRM_GROUP(); HRM_DEPARTMENT hRMDEPARTMENT = new HRM_DEPARTMENT(); HRM_BRANCH hRMBRANCH = new HRM_BRANCH(); if (o.Level == 0) { int num1 = 0; num = num1; this.m_Level = num1; string str1 = ""; str = str1; this.m_Code = str1; this.LoadGrid(num, str); } else if (o.Level == 1) { int num2 = 1; num = num2; this.m_Level = num2; string subsidiaryCode = o.SubsidiaryCode; str = subsidiaryCode; this.m_Code = subsidiaryCode; this.LoadGrid(num, str); } else if (o.Level == 2) { int num3 = 2; num = num3; this.m_Level = num3; string branchCode = o.BranchCode; str = branchCode; this.m_Code = branchCode; this.LoadGrid(num, str); } else if (o.Level == 3) { int num4 = 3; num = num4; this.m_Level = num4; string departmentCode = o.DepartmentCode; str = departmentCode; this.m_Code = departmentCode; this.LoadGrid(num, str); } else if (o.Level == 4) { int num5 = 4; num = num5; this.m_Level = num5; string groupCode = o.GroupCode; str = groupCode; this.m_Code = groupCode; this.LoadGrid(num, str); } }); }
private void frm_Updated(object sender, HRM_BRANCH Item) { this.UpdateRow(Item, this.m_RowClickEventArgs); }
private void xfmBranchAdd_Added(object sender, HRM_BRANCH Item) { this.ReLoad(); }
private void frm_Added(object sender, HRM_BRANCH e) { this.AddRow(e); }