Example #1
0
        private void tbmodelno_Leave(object sender, EventArgs e)
        {
            tb_ModelInfo       model      = new tb_ModelInfo();
            tb_ModelInfoMethod modeMethod = new tb_ModelInfoMethod();

            if (tbgoodname.Enabled)
            {
                if (tbgoodname.Text != "")
                {
                    model       = modeMethod.Find(tbgoodname.Text);
                    tbmono.Text = model.strModelNo;
                    tbftypestep1.SelectedValue = model.strFTypeSteps1 == null ? "" : model.strFTypeSteps1;
                    tbftypestep2.SelectedValue = model.strFTypeSteps2 == null ? "" : model.strFTypeSteps2;
                    tbftypestep3.SelectedValue = model.strFTypeSteps3 == null ? "" : model.strFTypeSteps3;
                    //tbfcolorsteps.SelectedValue = model.str
                    pictureBox1.ImageLocation = model.strFImagePath;
                    tbmqty.Text = model.strFMaterialQty;
                }
                else
                {
                    //tbModelNo1.Text = "";
                    tbftypestep1.Text         = "";
                    tbftypestep2.Text         = "";
                    tbftypestep3.Text         = "";
                    pictureBox1.ImageLocation = "";
                    tbmqty.Text = "";
                }
            }
        }
Example #2
0
 private void btnCancleClick(object sender, EventArgs e)
 {
     //新增取消
     if (toolbar1.flag == 0)
     {
         ClearControls();
         UpdateBindings(context);
         SetControlsReadOnly(true);
         isEdit = false;
     }
     else
     {
         //BindControls();
         //FreshJch();
         GridRow selectRow = superGridControl1.PrimaryGrid.ActiveRow as GridRow;
         good = goodmethod.Find(selectRow["ModelName"].Value.ToString());
         if (good != null)
         {
             tbModelNo.Text            = good.strModelNo;
             tbModelName.Text          = good.strModelName;
             cbtypestep1.SelectedValue = good.strFTypeSteps1 == null ? "" : good.strFTypeSteps1;
             cbtypestep2.SelectedValue = good.strFTypeSteps2 == null ? "" : good.strFTypeSteps2;
             cbtypestep3.SelectedValue = good.strFTypeSteps3 == null ? "" : good.strFTypeSteps3;
             pictureBox1.ImageLocation = good.strFImagePath;
             ckbIsstop.Checked         = good.iFIsStop == 1;
             tbmqty.Text = good.strFMaterialQty;
         }
         //UpdateBindings(context);
         SetControlsReadOnly(true);
         isEdit = false;
     }
 }