示例#1
0
 private void PaymentDescriptionSave(Label lblPayNum, DropDownList ddlFinished,
                                     DropDownList ddlRequired, TextBox txtTransmittalDate,
                                     TextBox txtPaymentDesc, TextBox txtPaymentDescID)
 {
     try {
         // validate data
         if (txtTransmittalDate.Text.Length > 0)
         {
             if (!Common.CodeLib.IsDate(txtTransmittalDate.Text))
             {
                 WSCIEMP.Common.CWarning warn = new WSCIEMP.Common.CWarning("If you enter a Transmittal Date for payment number " +
                                                                            lblPayNum.Text + ", it must be a valid date (mm/dd/yyyy).");
                 throw warn;
             }
         }
         WSCSecurity auth = Globals.SecurityState;
         WSCPayment.PaymentDescriptionSave(Int32.Parse(txtPaymentDescID.Text),
                                           Int32.Parse(lblPayNum.Text), _cropYear,
                                           txtPaymentDesc.Text,
                                           (Common.UILib.GetDropDownText(ddlRequired) == "Yes" ? true : false),
                                           (Common.UILib.GetDropDownText(ddlFinished) == "Yes" ? true : false),
                                           txtTransmittalDate.Text, auth.UserName);
     }
     catch (Exception ex) {
         Common.CException wex = new Common.CException("PaymentDescription.PaymentDescriptionSave", ex);
         throw (wex);
     }
 }