Example #1
0
        /// <summary>
        /// 删除产品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            M_ProductInformation m_ProductInformation = new M_ProductInformation();
            int count = Convert.ToInt16(dataGridView1.Rows.Count.ToString());

            for (int i = 0; i < count; i++)
            {
                DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell)dataGridView1.Rows[i].Cells[0];
                Boolean flag = Convert.ToBoolean(checkCell.Value);
                if (flag == true)     //查找被选择的数据行
                {
                    m_ProductInformation.productName += dataGridView1.Rows[i].Cells["id"].Value.ToString() + ",";
                }
                else
                {
                    continue;
                }
            }
            if (string.IsNullOrEmpty(m_ProductInformation.productName))
            {
                return;
            }
            string img        = string.Empty;
            string returnInfo = b_GetMethod.HandleProductInformation(m_ProductInformation, M_SQLType.Delete);

            GetTable();
            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);
        }
Example #2
0
        /// <summary>
        /// 添加产品
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBoxX1.Text) || string.IsNullOrEmpty(textBoxX3.Text) || string.IsNullOrEmpty(textBoxX2.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_ProductInformation m_ProductInformation = new M_ProductInformation();

            m_ProductInformation.productName    = textBoxX3.Text;
            m_ProductInformation.dataEntryStaff = textBoxX1.Text;
            m_ProductInformation.productNumber  = textBoxX2.Text;
            string img        = string.Empty;
            string returnInfo = b_GetMethod.HandleProductInformation(m_ProductInformation, M_SQLType.Insert);

            GetTable();
            img = returnInfo.Equals("产品【" + m_ProductInformation.productName + "】添加成功") ? @"../../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);
        }
Example #3
0
 /// <summary>
 /// 成品编码的增删查改
 /// </summary>
 /// <param name="m_ProductInformation"></param>
 /// <param name="m_SQLType"></param>
 /// <returns></returns>
 public string TheFinishProductInfo(M_ProductInformation m_ProductInformation, M_SQLType m_SQLType)
 {
     return(d_GetMethod.TheFinishProductInfo(m_ProductInformation, m_SQLType));
 }
Example #4
0
 /// <summary>
 /// 客户信息的增删查改
 /// </summary>
 /// <param name="m_ProductInformation"></param>
 /// <param name="m_SQLType"></param>
 /// <returns></returns>
 public string ServiceInfo(M_ProductInformation m_ProductInformation, M_SQLType m_SQLType)
 {
     return(d_GetMethod.ServiceInfo(m_ProductInformation, m_SQLType));
 }
Example #5
0
 /// <summary>
 /// 产品信息增删查改
 /// </summary>
 /// <param name="m_ProductInformation"></param>
 /// <param name="m_SQLType"></param>
 /// <returns></returns>
 public string HandleProductInformation(M_ProductInformation m_ProductInformation, M_SQLType m_SQLType)
 {
     return(d_GetMethod.HandleProductInformation(m_ProductInformation, m_SQLType));
 }