Ejemplo n.º 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)
     {
         MessageBox.Show("PH2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        public void PayHeadEdit(PayHeadInfo payheadinfo)
        {
            try
            {
                SPPayHead.PayHeadEdit(payheadinfo);
            }

            catch (Exception ex)
            {
                MessageBox.Show("CB:3" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }