Exemple #1
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void saveIns_Click(object sender, EventArgs e)
        {
            SupplierForm supplierMaterial = (SupplierForm)Owner;
            int          result           = 0;

            if (InsTextIsNull() == false)
            {
                return;
            }
            try
            {
                result = InsSupplierFun(supplierMaterial.stats);
                if (result > 0)
                {
                    MessageBox.Show("保存成功!");
                    supplierMaterial.isflag = true;
                    Close();
                    Dispose();
                }
                else
                {
                    MessageBox.Show("未知原因,保存失败!");
                    supplierMaterial.isflag = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("保存失败,请检查服务器连接并尝试重新保存.错误:" + ex.Message);
            }
        }
Exemple #2
0
        private void supplier_Click(object sender, EventArgs e)
        {
            SupplierForm supplierForm = new SupplierForm();

            LoadFormToPanel(supplierForm, supplierPanel);

            //supplierForm.ShowDialog();
        }
Exemple #3
0
        private void btnSuppliers_Click(object sender, EventArgs e)
        {
            this.deleteSubs();
            SupplierForm supplierForm = new SupplierForm();

            supplierForm.MdiParent = (Form1)this.MdiParent;
            supplierForm.Anchor    = AnchorStyles.Top | AnchorStyles.Right;
            supplierForm.Dock      = DockStyle.Fill;
            supplierForm.Show();
        }
        private void SupplierButton_Click(object sender, EventArgs e)
        {
            var form = new SupplierForm
            {
                MdiParent     = this,
                StartPosition = FormStartPosition.CenterScreen
            };

            form.Show();
        }
Exemple #5
0
        public void Test3()
        {
            //объявление формы для теста
            SupplierForm supplier = new SupplierForm();
            //переменная для запроса
            string ds1;

            //запись в переменную значение запроса
            ds1 = supplier.sqlstr;
            //проверка переменной с запросом на пустое значение
            Assert.IsNotNull(ds1);
        }
Exemple #6
0
        private void supplierCreate_Click(object sender, EventArgs e)
        {
            //SupplierForm aForm=new SupplierForm();
            //aForm.Show();

            try
            {
                pnlContext.Controls.Clear();
                SupplierForm aRawMaterialsItemDetails = new SupplierForm();
                aRawMaterialsItemDetails.Parent = this;
                pnlContext.Controls.Add(aRawMaterialsItemDetails);
                aRawMaterialsItemDetails.Dock = DockStyle.Fill;
            }
            catch (Exception exp)
            {
            }
        }
Exemple #7
0
        /// <summary>
        /// 加载事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void InsSupplier_Load(object sender, EventArgs e)
        {
            AddTree("", null, "", comboTree1);
            comboTree1.AdvTree.NodeDoubleClick += AdvTree_NodeDoubleClick;
            SupplierForm supplierMaterial = (SupplierForm)this.Owner;

            switch (supplierMaterial.stats)
            {
            case 0:
                su_code.Text = BuildCode.ModuleCode("Su");
                break;

            case 1:
                BindControl();
                break;

            default:
                MessageBox.Show("类型错误!");
                break;
            }
            //if (supplierMaterial.stats == 0)
            //{
            //    su_code.Text = BuildCode.ModuleCode("Supplier");
            //    //    int result = InsSupplierFun();
            //    //    if (result > 0)
            //    //    {
            //    //        MessageBox.Show(string.Format("编号:{0},新增成功", su_code.ToString()));
            //    //        supplierMaterial.isflag = true;
            //    //    }
            //    //    else
            //    //    {
            //    //        MessageBox.Show("未知错误,添加失败");
            //    //        supplierMaterial.isflag = false;
            //    //    }
            //}
            //if (supplierMaterial.stats == 1)
            //{
            //    BindControl();
            //}
        }
Exemple #8
0
        private void BindControl()
        {
            SupplierForm supplierMaterial = (SupplierForm)this.Owner;
            Supplier     supplier         = sm.SelUpdateSupplierByCode(supplierMaterial.code);

            su_name.Text          = supplier.Su_Name;
            su_code.Text          = supplierMaterial.code;
            su_phone.Text         = supplier.Su_Phone;
            su_address.Text       = supplier.Su_Address;
            su_fax.Text           = supplier.Su_fax;
            su_email.Text         = supplier.Su_Email;
            su_bankaccounts.Text  = supplier.Su_Bankaccounts;
            su_bank.Text          = supplier.Su_Bank;
            su_credit.RatingValue = supplier.Su_Credit;
            su_money.Text         = supplier.Su_Money;
            su_surplus.Text       = supplier.Su_Surplus;
            su_Reckoning.Text     = supplier.Su_Reckoning;
            su_empname.Text       = supplier.Su_Empname;
            su_empPhone.Text      = supplier.Su_EmpPhone;
            su_remark.Text        = supplier.Su_Remark;
            su_enable.Checked     = supplier.Su_Enable == 1 ? false : true;
        }
Exemple #9
0
        private void supplier_Click(object sender, EventArgs e)
        {
            SupplierForm supplierForm = new SupplierForm();

            supplierForm.ShowDialog();
        }
Exemple #10
0
        //~-供应商按钮
        private void buttonItemSupplier_Click(object sender, EventArgs e)
        {
            SupplierForm su = new SupplierForm();

            su.ShowDialog();
        }