private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(textBox4.Text) || string.IsNullOrWhiteSpace(textBox5.Text) || string.IsNullOrWhiteSpace(textBox5.Text))
            {
                ToastNotification.CustomGlowColor = Color.FromArgb(48, 32, 22);
                ToastNotification.Show(this, "产品,工单,产品序列号不能为空", BLL.B_GetMethod.ReadImageFile(@"../../Images/Error.png"), 2000, eToastGlowColor.Red, eToastPosition.MiddleCenter);
                return;
            }
            M_MaintainWorkOrder m_MaintainWorkOrder = new M_MaintainWorkOrder();

            m_MaintainWorkOrder.settingInformation            = checkBox1.Checked ? 1 : 0;
            m_MaintainWorkOrder.productSerialNumberLength     = checkBox2.Checked == true? 1 : 0;
            m_MaintainWorkOrder.productSerialNumberprefix     = checkBox3.Checked == true ? 1 : 0;
            m_MaintainWorkOrder.settingInformationText        = textBox1.Text;
            m_MaintainWorkOrder.productSerialNumberText       = (int)numericUpDown1.Value;
            m_MaintainWorkOrder.productSerialNumberprefixText = textBox3.Text;
            m_MaintainWorkOrder.productName = textBox4.Text;
            m_MaintainWorkOrder.workOrder   = textBox5.Text;
            m_MaintainWorkOrder.isAcceptableQualityLevel = radioButton1.Checked == true ? 1 : 0;
            m_MaintainWorkOrder.serialNumber             = textBox6.Text;
            string returnInfo = b_GetMethod.MaintainWorkOrder(m_MaintainWorkOrder, M_SQLType.Insert);

            GetTable();
            string img = returnInfo.Equals("添加成功") ? @"../../Images/success.png" : @"../../Images/Error.png";

            ToastNotification.CustomGlowColor = Color.FromArgb(48, 32, 22);
            ToastNotification.Show(this, returnInfo, BLL.B_GetMethod.ReadImageFile(img), 2000, eToastGlowColor.Red, eToastPosition.MiddleCenter);
        }
Exemple #2
0
 /// <summary>
 /// 工单维护增删查改
 /// </summary>
 /// <param name="m_MaintainWorkOrder"></param>
 /// <param name="m_SQLType"></param>
 /// <returns></returns>
 public string MaintainWorkOrder(M_MaintainWorkOrder m_MaintainWorkOrder, M_SQLType m_SQLType)
 {
     return(d_GetMethod.MaintainWorkOrder(m_MaintainWorkOrder, m_SQLType));
 }