public void Init(Guid SalaryTableListID, string EmployeeCode) { this.barManager1.SetPopupContextMenu(this.gcList, this.ppMenu); this.m_SalaryTableListID = SalaryTableListID; this.m_EmployeeCode = EmployeeCode; this.InitData(); this.repMoney.EditValueChanging += new ChangingEventHandler(this.repMoney_EditValueChanging); this.repMoney.EditValueChanged += new EventHandler(this.repMoney_EditValueChanged); HRM_SALARY_MINUS hRMSALARYMINU = new HRM_SALARY_MINUS(); this.gcList.DataSource = hRMSALARYMINU.GetListByEmployee(this.m_SalaryTableListID, this.m_EmployeeCode); }
public void Save() { HRM_SALARY_MINUS hRMSALARYMINU = new HRM_SALARY_MINUS(); hRMSALARYMINU.DeleteAll(this.m_SalaryTableListID, this.m_EmployeeCode); try { foreach (DataRow row in (this.gcList.DataSource as DataTable).Rows) { try { if (row != null) { string str = ""; try { str = (row["DeductionCode"] != null ? row["DeductionCode"].ToString() : ""); } catch { } hRMSALARYMINU.Insert(this.m_SalaryTableListID, this.m_EmployeeCode, Guid.NewGuid(), str, row["SalaryMinusName"].ToString(), decimal.Parse(row["Money"].ToString()), row["Description"].ToString()); } } catch { continue; } } this.UpdateEmployeeSalary(); this.RaiseSavedHander(); } catch { } }