示例#1
0
 private void tbgoodid_Leave(object sender, EventArgs e)
 {
     if (isEdit == true && tbgoodid.Text.Trim() != "")
     {
         string[] IDS = tbgoodid.Text.Trim().Split('.');
         if (IDS.Length > 0)
         {
             tb_ColorInfoMethod colorMethod = new tb_ColorInfoMethod();
             tb_ColorInfo       color       = colorMethod.Find(IDS[0]);
             if (!string.IsNullOrEmpty(color.strColorNo))
             {
                 cmbColor.SelectedValue = color.strColorNo;
                 cmbColor.Text          = color.strColorName;
                 if (IDS.Length > 1)
                 {
                     tb_ModelInfoMethod modelmethod = new tb_ModelInfoMethod();
                     tb_ModelInfo       model       = modelmethod.FindByID(IDS[1]);
                     if (!string.IsNullOrEmpty(model.strModelNo))
                     {
                         tbgoodname.SelectedValue = model.strModelNo;
                         tbgoodname.Text          = model.strModelName;
                         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;
                         tbmqty.Text = model.strFMaterialQty;
                     }
                 }
             }
         }
     }
 }
示例#2
0
        private void btnCancleClick(object sender, EventArgs e)
        {
            //新增取消
            if (toolbar1.flag == 0)
            {
                ClearControls();
                UpdateBindings(context);
                SetControlsReadOnly(true);
            }
            else
            {
                //BindControls();
                //FreshJch();
                //UpdateBindings(context);
                GridRow selectRow = superGridControl1.PrimaryGrid.ActiveRow as GridRow;

                good = goodmethod.Find(selectRow["ColorNo"].Value.ToString());
                if (good != null)
                {
                    tbColorNo.Text            = good.strColorNo;
                    tbColorName.Text          = good.strColorName;
                    cmbtypestep.SelectedValue = string.IsNullOrEmpty(good.strFColorSteps) ? "" : good.strFColorSteps;
                    ckbIsStop.Checked         = good.iFIsStop == 1;
                }
                SetControlsReadOnly(true);
            }
        }
示例#3
0
        private void cmbColor_Leave(object sender, EventArgs e)
        {
            tb_ColorInfo       color  = new tb_ColorInfo();
            tb_ColorInfoMethod colorM = new tb_ColorInfoMethod();

            if (cmbColor.SelectedValue != null)
            {
                color = colorM.Find(cmbColor.SelectedValue.ToString());
                tbfcolorsteps.SelectedValue = color.strFColorSteps == null ? "" : color.strFColorSteps;
            }
            else
            {
                tbfcolorsteps.Text = "";
            }
        }