Exemplo n.º 1
0
 private void cmdOK_Click(object sender, EventArgs e)
 {
     m_oStatus.VendorId = VenId;
     if (optRenewal.Checked == true)
     {
         SType = "R";
     }
     if (optSuspend.Checked == true)
     {
         SType = "S";
     }
     if (optBlock.Checked == true)
     {
         SType = "B";
     }
     if (optCancel.Checked == true)
     {
         SType = "C";
     }
     m_oStatus.StatusType = SType;
     if (optSupply.Checked == true)
     {
         RType = "S";
     }
     if (optContract.Checked == true)
     {
         RType = "C";
     }
     if (optService.Checked == true)
     {
         RType = "H";
     }
     m_oStatus.RefNo     = txtRefNo.Text;
     m_oStatus.RegType   = RType;
     m_oStatus.SDate     = dtpDate.Value;
     m_oStatus.ValidFrom = dtpFDate.Value;
     m_oStatus.ValidTo   = dtpTDate.Value;
     if (chkLifTime.Checked == true)
     {
         m_oStatus.LifTime = 1;
     }
     else
     {
         m_oStatus.LifTime = 0;
     }
     if (m_oStatus.StatusId == 0)
     {
         m_oStatus.InsertStatusEntry(m_oStatus);
     }
     else
     {
         m_oStatus.UpdateStatusEntry(m_oStatus);
     }
     //m_bOk = true;
     this.Close();
 }