示例#1
0
 private void btnAddnew_Click(object sender, EventArgs e)
 {
     var AddPro = new FRM_ADD_PRODUCT();
     AddPro.ShowDialog();
 }
示例#2
0
 private void Pro_ClickHandler(Object sender, EventArgs e)
 {
     Boolean check = true;
     Color col = DelMode;
     ProIndex = Convert.ToInt32(((Button)sender).AccessibleName);
     if (!isDel)
     {
         // MessageBox.Show("Button " + ((Button)sender).ToString() + " was clicked");
         string str = ((Button)sender).Tag.ToString();
         DataTable dtPro = new DataTable();
         var frmPro = new FRM_ADD_PRODUCT();
         frmPro.proID = Convert.ToInt32(str);
         frmPro.ShowDialog();
     }
     else
     {
         if (GlobalchkDelPro[ProIndex].Checked == true)
         { 
             check = false; col = DefualPro;
             if (Convert.ToInt32(GlobalLabelStock[ProIndex].Tag.ToString()) == 0) col = AlertColor;
         }
         GlobalchkDelPro[ProIndex].Checked = check;
         GlobalProGroup[ProIndex].BackColor = col;
     }
 }