/// <summary> /// Function to edit /// </summary> public void EditFunction() { try { BonusDedutionInfo infoBonusDeduction = new BonusDedutionInfo(); BonusDedutionSP spBonusDeduction = new BonusDedutionSP(); infoBonusDeduction.Date = Convert.ToDateTime(dtpDate.Text.ToString()); infoBonusDeduction.EmployeeId = Convert.ToDecimal(cmbEmployeeCode.SelectedValue.ToString()); infoBonusDeduction.Month = Convert.ToDateTime(dtpMonth.Text.ToString()); infoBonusDeduction.BonusAmount = Convert.ToDecimal(txtBonusAmount.Text.ToString()); infoBonusDeduction.DeductionAmount = Convert.ToDecimal(txtDeductionAmount.Text.ToString()); infoBonusDeduction.Narration = txtNarration.Text; infoBonusDeduction.Extra1 = string.Empty; infoBonusDeduction.Extra2 = string.Empty; infoBonusDeduction.BonusDeductionId = decBonusId; spBonusDeduction.BonusDedutionEdit(infoBonusDeduction); Messages.UpdatedMessage(); btnSave.Text = "Save"; btnDelete.Enabled = false; dtpDate.Focus(); if (frmBonusDeductionRegisterObj != null) { frmBonusDeductionRegisterObj.Show(); this.Close(); } } catch (Exception ex) { MessageBox.Show("BD3:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to edit /// </summary> public string EditFunction(string employeeId, string date, string month, string bonusAmount, string deductionAmount, string narration, string bonusId) { string message = string.Empty; try { BonusDedutionInfo infoBonusDeduction = new BonusDedutionInfo(); BonusDedutionSP spBonusDeduction = new BonusDedutionSP(); infoBonusDeduction.Date = Convert.ToDateTime(date); infoBonusDeduction.EmployeeId = Convert.ToDecimal(employeeId); infoBonusDeduction.Month = Convert.ToDateTime(month); infoBonusDeduction.BonusAmount = Convert.ToDecimal(bonusAmount); infoBonusDeduction.DeductionAmount = Convert.ToDecimal(deductionAmount); infoBonusDeduction.Narration = narration; infoBonusDeduction.Extra1 = string.Empty; infoBonusDeduction.Extra2 = string.Empty; infoBonusDeduction.BonusDeductionId = Convert.ToDecimal(bonusId); spBonusDeduction.BonusDedutionEdit(infoBonusDeduction); } catch (Exception ex) { } return(message); }
/// <summary> /// Function to Update values in BonusDeduction Table /// </summary> /// <param name="bonusdedutioninfo"></param> public void BonusDedutionEdit(BonusDedutionInfo bonusdedutioninfo) { try { SPBonusDedution.BonusDedutionEdit(bonusdedutioninfo); } catch (Exception ex) { MessageBox.Show("BDBll2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }