Beispiel #1
0
 /// <summary>
 /// Function for Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         PayHeadSP   spPayhead   = new PayHeadSP();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadId   = decPayHeadId;
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type        = cmbPayheadType.Text;
         infoPayhead.Narration   = txtPayheadNarration.Text.Trim();
         if (spPayhead.PayheadCheckExistence(txtPayheadName.Text.Trim(), infoPayhead.PayHeadId) == false)
         {
             spPayhead.PayHeadEdit(infoPayhead);
             GridFill();
             Messages.UpdatedMessage();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Payhead name already exist");
             txtPayheadName.Focus();
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PH2:" + ex.Message;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Function for save
 /// </summary>
 public void SaveFunction()
 {
     try
     {
         PayHeadSP   spPayhead   = new PayHeadSP();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type        = cmbPayheadType.SelectedItem.ToString();
         infoPayhead.Narration   = txtPayheadNarration.Text.Trim();
         infoPayhead.ExtraDate   = DateTime.Parse(DateTime.Now.ToString());
         infoPayhead.Extra1      = string.Empty;
         infoPayhead.Extra2      = string.Empty;
         if (btnPayheadSave.Text == "Save")
         {
             if (spPayhead.PayheadCheckExistence(txtPayheadName.Text.Trim(), 0) == false)
             {
                 Messages.SavedMessage();
                 spPayhead.PayHeadAdd(infoPayhead);
                 GridFill();
                 Clear();
             }
             else
             {
                 Messages.InformationMessage("Payhead name already exist");
                 txtPayheadName.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PH1:" + ex.Message;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Function for Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         PayHeadSP   spPayhead   = new PayHeadSP();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadId   = decPayHeadId;
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type        = cmbPayheadType.Text;
         infoPayhead.Narration   = txtPayheadNarration.Text.Trim();
         if (spPayhead.PayheadCheckExistence(txtPayheadName.Text.Trim(), infoPayhead.PayHeadId) == false)
         {
             spPayhead.PayHeadEdit(infoPayhead);
             GridFill();
             Messages.UpdatedMessage();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Payhead name already exist");
             txtPayheadName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PH2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #4
0
 /// <summary>
 /// Function for save
 /// </summary>
 public void SaveFunction()
 {
     try
     {
         PayHeadSP spPayhead = new PayHeadSP();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type = cmbPayheadType.SelectedItem.ToString();
         infoPayhead.Narration = txtPayheadNarration.Text.Trim();
         infoPayhead.ExtraDate = DateTime.Parse(DateTime.Now.ToString());
         infoPayhead.Extra1 = string.Empty;
         infoPayhead.Extra2 = string.Empty;
         if (btnPayheadSave.Text == "Save")
         {
             if (spPayhead.PayheadCheckExistence(txtPayheadName.Text.Trim(), 0) == false)
             {
                 Messages.SavedMessage();
                 spPayhead.PayHeadAdd(infoPayhead);
                 GridFill();
                 Clear();
             }
             else
             {
                 Messages.InformationMessage("Payhead name already exist");
                 txtPayheadName.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PH1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #5
0
 /// <summary>
 /// Function for Edit
 /// </summary>
 public void EditFunction()
 {
     try
     {
         PayHeadSP spPayhead = new PayHeadSP();
         PayHeadInfo infoPayhead = new PayHeadInfo();
         infoPayhead.PayHeadId = decPayHeadId;
         infoPayhead.PayHeadName = txtPayheadName.Text.Trim();
         infoPayhead.Type = cmbPayheadType.Text;
         infoPayhead.Narration = txtPayheadNarration.Text.Trim();
         if (spPayhead.PayheadCheckExistence(txtPayheadName.Text.Trim(), infoPayhead.PayHeadId) == false)
         {
             spPayhead.PayHeadEdit(infoPayhead);
             GridFill();
             Messages.UpdatedMessage();
             Clear();
         }
         else
         {
             Messages.InformationMessage("Payhead name already exist");
             txtPayheadName.Focus();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PH2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }