示例#1
0
        private void txtPayCode_Click(object sender, EventArgs e)
        {
            FormSalesTables from = new FormSalesTables( );

            from.StartPosition = FormStartPosition.CenterParent;
            if (from.ShowDialog( ) != DialogResult.OK)
            {
                return;
            }
            txtPayCode.Text        = from.fish.code;
            txtNumbering.Text      = from.fish.Numbering;
            txtPayUnit.Text        = from.fish.demand;
            txtPayUnit.Tag         = from.fish.demandId;
            txtFishMealId.Text     = from.fish.Product_id;
            txtcontacts.Text       = from.fish.DemandContact;
            txtcontacts.Tag        = from.fish.DemandContactId;
            txtpurchasecode.Text   = from.fish.Purchasecontractnumber;
            txtPurchasingUnit.Text = from.fish.Purchasingunits;
            txtPurchasingUnit.Tag  = from.fish.PurchasingunitsId;
            txtPayAcount.Text      = from.fish.accountnumber.ToString();
            txtbackDeposit.Text    = from.fish.Bank;
            txtCNumbering.Text     = from.fish.CNumbering;
            txtNumbering.Text      = from.fish.Numbering;
            //采购单位Purchasingunits
        }
示例#2
0
        private void txtcodeNum_DoubleClick(object sender, EventArgs e)
        {
            FormSalesTables Form = new FormSalesTables();

            Form.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (Form.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            txtcodeNumContract.Text = Form.fish.code;
            txtreturnParty.Text     = Form.fish.demand;
            txtreturnParty.Tag      = Form.fish.demandId;
            txtreturnPartyJ.Text    = Form.fish.DemandAbbreviation;
            txtreceive.Text         = Form.fish.supplier;
            txtreceiveJ.Text        = Form.fish.SupplierAbbreviation;
            txtreceive.Tag          = Form.fish.supplierId;
            txtfishId.Text          = Form.fish.Product_id;
            txtcodeNum.Text         = Form.fish.Numbering;
            txtcountry.Text         = Form.fish.Country;
            txtbrand.Text           = Form.fish.pp;

            txtproName.Text = Form.fish.Productname;
            txtcondb.Text   = Form.fish.Db;
            txtconza.Text   = Form.fish.Za;
            txtcons.Text    = Form.fish.Sz;
            txtcontvn.Text  = Form.fish.Tvn;
            txtconhf.Text   = Form.fish.Hf;
            txtconsf.Text   = Form.fish.Sf;
            txtconshy.Text  = Form.fish.Shy;
            txtconzf.Text   = Form.fish.Zf;
            txtprice.Text   = Form.fish.HeTongDanJia;
            txtdeliAdd.Text = Form.fish.delivery;
        }
        private void txtCodeOdd_Click(object sender, EventArgs e)
        {
            FormSalesTables from = new FormSalesTables();

            from.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (from.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            txtCodeOdd.Text = string.Empty;
            txtCodeOdd.Text = from.fish.code;
        }
示例#4
0
        /// <summary>
        /// 读取现货销售合同的单号
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtCodeOdd_Click(object sender, EventArgs e)
        {
            FormSalesTables from = new FormSalesTables();

            //from.signOfOpen = this.Name;
            StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (from.ShowDialog( ) != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            txtCodeOdd.Text      = string.Empty;
            txtCodeOdd.Text      = from.fish.code;
            txtcontactsunit.Text = from.fish.demand;
            txtcontactsunit.Tag  = from.fish.demandId;
        }
示例#5
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex < 0 || e.RowIndex < 0)
            {
                return;
            }
            bool isOk = true;

            if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("product_id", StringComparison.OrdinalIgnoreCase) == true)
            {
                FormSalesTables form = new FormSalesTables();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.SalesRequisitionEntity head = form.fish;
                if (head == null)
                {
                    return;
                }
                for (int i = 0; i < dataGridView1.Rows.Count - 1; i++)
                {
                    //if (!string.IsNullOrEmpty(dataGridView1.Rows[i].Cells["product_id"].Value.ToString()) && dataGridView1.Rows[i].Cells["product_id"].Value.ToString() == head.Product_id)
                    //{
                    if (i != e.RowIndex)
                    {
                        isOk = false;
                        break;
                    }
                    //}
                }
                if (isOk == false)
                {
                    return;
                }
                dataGridView1.Rows[e.RowIndex].Cells["product_id"].Value  = head.Product_id;
                dataGridView1.Rows[e.RowIndex].Cells["productname"].Value = head.Productname;
                dataGridView1.Rows[e.RowIndex].Cells["Funit"].Value       = head.Funit;
                dataGridView1.Rows[e.RowIndex].Cells["Variety"].Value     = head.Variety;
                dataGridView1.Rows[e.RowIndex].Cells["Quantity"].Value    = head.Quantity;
                dataGridView1.Rows[e.RowIndex].Cells["unitprice"].Value   = head.UnitPrice;
                dataGridView1.Rows[e.RowIndex].Cells["amonut"].Value      = head.Amonut;
            }
        }
示例#6
0
        //获取现货销售单号
        private void txtCodeOdd_Click(object sender, EventArgs e)
        {
            FormSalesTables from = new FormSalesTables();

            from.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (from.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            txtCodeOdd.Text    = string.Empty;
            txtCodeOdd.Text    = from.fish.code;
            Sellers.Text       = from.fish.demand;
            Sellers.Tag        = from.fish.demandId;
            Buyers.Text        = from.fish.Purchasingunits;
            Buyers.Tag         = from.fish.PurchasingunitsId;
            txtFishMealId.Text = from.fish.Product_id;
            txtNumbering.Text  = from.fish.Numbering;
            cmbCountry.Text    = from.fish.Country;
            cmbName.Text       = from.fish.pp;
        }
示例#7
0
        private void txtCodeOdd_Click(object sender, EventArgs e)
        {
            FormSalesTables from = new FormSalesTables( );

            from.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (from.ShowDialog( ) != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }

            txtCodeOdd.Text           = string.Empty;
            txtCodeOdd.Text           = from.fish.code;
            txtRebate.Text            = from.fish.rebate.ToString();
            txtFreight.Text           = from.fish.Freight.ToString();
            txtPrice.Text             = from.fish.HeTongDanJia.ToString();
            txtCompany.Text           = from.fish.supplier;
            txtCompany.Tag            = from.fish.supplierId;
            txtDemaUndnit.Text        = from.fish.demand;
            txtDemaUndnit.Tag         = from.fish.demandId;
            txtDemandSideContact.Text = from.fish.DemandContact;
            txtDemandSideContact.Tag  = from.fish.DemandContactId;
        }
示例#8
0
        public override int Query( )
        {
            FormSalesTables form = new FormSalesTables();

            form.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                if (form.fish == null)
                {
                    return(1);
                }
            }
            txtcode.Text = string.Empty;
            txtcode.Text = form.fish.code;
            dataGridView1.Rows.Clear();
            GenerateContect();
            if (result == true)
            {
                GenerateBody();
            }

            return(base.Query( ));
        }