Exemplo n.º 1
0
 /// <summary>
 /// 产品变更
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmbProduct_SelectedIndexChanged(object sender, EventArgs e)
 {
     txtProductID.Text = NCCryp.getProductID(cmbProduct.Text);
     if (txtProductID.Text == "")
     {
         string msg = NCMessage.GetInstance(db.Language).GetMessageById("CM0106I", db.Language);
         MessageBox.Show(msg);
         return;
     }
     txtLicId.Text = "";
 }
Exemplo n.º 2
0
 /// <summary>
 /// 画面初期化
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void FormRegist_Load(object sender, EventArgs e)
 {
     try
     {
         if (GetProductValue())
         {
             string[] products = product.Split(';');
             foreach (string prod in products)
             {
                 cmbProduct.Items.Add(prod);
             }
             cmbProduct.SelectedIndex = 0;
         }
         txtProductID.Text = NCCryp.getProductID();
         if (txtProductID.Text == "")
         {
             string msg = NCMessage.GetInstance(db.Language).GetMessageById("CM0106I", db.Language);
             MessageBox.Show(msg);
             return;
         }
     }
     catch (Exception ex)
     {
         NCLogger.GetInstance().WriteExceptionLog(ex);
         return;
     }
     if (GetConfigValue())
     {
         txtLicId.Text = lic;
         if (txtLicId.Text != "" && NCCryp.checkLic(txtLicId.Text))
         {
             btnRegist.Enabled = false;
             btnSend.Enabled   = false;
             btnAdd.Enabled    = false;
         }
     }
     if (isOwner())
     {
         txtProductID.ReadOnly = false;
         btnCreate.Enabled     = true;
         btnCreate.Visible     = true;
         btnAdd.Enabled        = true;
     }
     else
     {
         btnCreate.Enabled = false;
         btnCreate.Visible = false;
         btnAdd.Enabled    = false;
     }
 }