예제 #1
0
 private void requistionDate(string sql)
 {
     HY_BLL.HY_SupplierBLL hysuplist = new HY_SupplierBLL();
     this.listView1.View = View.Details;
     this.listView1.FullRowSelect = true;
     SqlDataReader sdr = hysuplist.f_SupplierLiset(sql);
     while (sdr.Read())
     {
         ListViewItem lv = new ListViewItem(sdr[0].ToString());
         lv.SubItems.Add(sdr[1].ToString());
         lv.SubItems.Add(sdr[2].ToString());
         this.listView1.Items.Add(lv);
     }
 }
예제 #2
0
 private void HY_SupplierList_Load(object sender, EventArgs e)
 {
     HY_BLL.HY_SupplierBLL hysuplist = new HY_SupplierBLL();
     this.listView1.View = View.Details;
     this.listView1.FullRowSelect = true;
     string sql = "select s_gyName,s_jName,s_Area,s_Name,s_Tel,s_cpName from HY_Supplier";
     SqlDataReader sdr = hysuplist.f_SupplierLiset(sql);
     while (sdr.Read())
     {
         ListViewItem lv = new ListViewItem(sdr[0].ToString());
         lv.SubItems.Add(sdr[1].ToString());
         lv.SubItems.Add(sdr[2].ToString());
         lv.SubItems.Add(sdr[3].ToString());
         lv.SubItems.Add(sdr[4].ToString());
         lv.SubItems.Add(sdr[5].ToString());
         lv.ImageIndex = 1;
         this.listView1.Items.Add(lv);
     }
 }
예제 #3
0
        private void toolStripAdd_Click(object sender, EventArgs e)
        {
            this.toolStripEdit.Enabled = false;
            this.toolStripAdd.Enabled = false;
            this.toolStripSave.Enabled = true;
            this.toolStripCEL.Enabled = true;
            this.groupA.Enabled = true;
            this.groupB.Enabled = true;
            string d = "DH";
            this.p_ID.Text = hyNO.JhGoodsID(d);
            intFalg = 1;

            //绑定供应商信息
            HY_BLL.HY_SupplierBLL hysup = new HY_SupplierBLL();
            this.p_gyName.DataSource = hysup.back_Supplier();
            this.p_gyName.DisplayMember = "s_gyName";
            this.p_gyName.ValueMember = "s_ID";

            //绑定用户信息
            HY_BLL.HY_UserListBLL hyul = new HY_UserListBLL();
            this.p_rPerson.DataSource = hyul.back_SupplierPrice();
            this.p_rPerson.DisplayMember = "h_UserName";
            this.p_rPerson.ValueMember = "h_ID";
        }
예제 #4
0
        private void toolStripSave_Click(object sender, EventArgs e)
        {
            HY_Model.HY_Supplier u = new HY_Model.HY_Supplier();
            u.S_gyName = this.gyName.Text.Trim();
            u.S_jName = this.jName.Text.Trim();
            u.S_Area = this.Area.Text.Trim();
            u.S_cpName = this.cpName.Text.Trim();
            u.S_name = this.name.Text.Trim();
            u.S_tel = this.tel.Text.Trim();

            //添加动作
            if (intFalg == 1)
            {
                bool isEmpty = UserInputCheck();
                if (isEmpty == true)
                {
                    HY_BLL.HY_SupplierBLL hysup = new HY_SupplierBLL();
                    int res = hysup.com_Supplier(u);
                    if (res > 0)
                    {
                        MessageBoxEx.Show("提示信息:供应商信息添加成功!");
                        this.Close();
                    }
                }
            }

            if (intFalg == 2)
            {
                bool isEmpty = UserInputCheck();
                if (isEmpty == true)
                {
                    string sql = "Update HY_Supplier set s_gyName='" + this.gyName.Text.Trim() + "',s_jName='" + this.jName.Text.Trim() + "',s_Area='" + this.Area.Text.Trim() + "',s_cpName='" + this.cpName.Text.Trim() + "',s_Name='" + this.name.Text.Trim() + "',s_Tel='" + this.tel.Text.Trim() + "' where s_ID='" + this.label1.Text.Trim() + "'";
                    int res = hystorbll.com_HY_HY_Storagelslist(sql);
                    if (res > 0)
                    {
                        MessageBoxEx.Show("产品修改成功,确定后关闭窗口!", "操作提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                        requistionDate();
                        this.Close();
                    }
                }
            }
        }