Beispiel #1
0
 public FormReturnReceipt(string name)
 {
     InitializeComponent();
     _model = new FishEntity.ReturnReceiptEntity();
     _bll   = new FishBll.Bll.ReturnReceiptBll();
     InitDataUtil.BindComboBoxData(txtcountry, FishEntity.Constant.CountryType, true);
     InitDataUtil.BindComboBoxData(txtbrand, FishEntity.Constant.Brand, true);
     InitDataUtil.BindComboBoxData(txtvarieties, FishEntity.Constant.Goods, true);
     getname = name; panel1.Enabled = false;
 }
Beispiel #2
0
 public override int Add( )
 {
     clearControl( );
     txtcode.Text = _bll.getCode( );
     if (getname != null && getname != "")
     {
         FishEntity.SalesRequisitionEntity _model = new FishEntity.SalesRequisitionEntity();
         _bll   = new FishBll.Bll.ReturnReceiptBll();
         _model = _bll.getTHD(getname);
         if (_model != null)
         {//22
             txtcodeNumContract.Text = _model.code;
             txtreturnParty.Text     = _model.demand;
             txtreturnParty.Tag      = _model.demandId;
             txtreturnPartyJ.Text    = _model.DemandAbbreviation;
             txtreceive.Text         = _model.supplier;
             txtreceiveJ.Text        = _model.SupplierAbbreviation;
             txtreceive.Tag          = _model.supplierId;
             txtfishId.Text          = _model.Product_id;
             txtcodeNum.Text         = _model.Numbering;
             txtcountry.Text         = _model.Country;
             txtbrand.Text           = _model.pp;
             txtspeci.Text           = _model.Funit;
             txtproName.Text         = _model.Productname;
             txtcondb.Text           = _model.Db;
             txtconza.Text           = _model.Za;
             txtcons.Text            = _model.Sz;
             txtcontvn.Text          = _model.Tvn;
             txtconhf.Text           = _model.Hf;
             txtconsf.Text           = _model.Sf;
             txtconshy.Text          = _model.Shy;
             txtconzf.Text           = _model.Zf;
             txtprice.Text           = _model.HeTongDanJia;
             txtdeliAdd.Text         = _model.delivery;
             if (_model.RabZy == true)
             {
                 rabchengpin.Visible = false;
             }
             panel1.Enabled = true;
         }
         if (getname != null && getname != "")
         {
             FishEntity.OnepoundEntity _modeloo = new FishEntity.OnepoundEntity();
             _bll     = new FishBll.Bll.ReturnReceiptBll();
             _modeloo = _bll.getjingz(getname);
             if (_modeloo != null)
             {
                 txtShipmentsTons.Text = _modeloo.Competition;
             }
         }
     }
     tmiSave.Visible = true;
     return(base.Add( ));
 }
Beispiel #3
0
        public override int Query()
        {
            if (Megres.oddNum != "" && Megres.oddNum != null)
            {
                strWhere += " codeNum= '" + Megres.oddNum + "' ";
            }
            else
            {
                strWhere = string.Empty;
            }
            _bll = new FishBll.Bll.ReturnReceiptBll();
            DataTable table = _bll.getTable(strWhere);

            strWhere = string.Empty;
            if (table != null && table.Rows.Count > 0)
            {
                dataGridView1.Rows.Clear();
                for (int i = 0; i < table.Rows.Count; i++)
                {
                    int             idx = dataGridView1.Rows.Add();
                    DataGridViewRow row = dataGridView1.Rows[idx];
                    row.Cells["id"].Value              = table.Rows[i]["id"].ToString();
                    row.Cells["codeNum"].Value         = table.Rows[i]["codeNum"].ToString();
                    row.Cells["codeNumContract"].Value = table.Rows[i]["codeNumContract"].ToString();
                    row.Cells["CODE"].Value            = table.Rows[i]["CODE"].ToString();
                    row.Cells["returnPartyJ"].Value    = table.Rows[i]["returnPartyJ"].ToString();
                    row.Cells["receiveJ"].Value        = table.Rows[i]["receiveJ"].ToString();
                    row.Cells["speci"].Value           = table.Rows[i]["speci"].ToString();
                    row.Cells["tons"].Value            = table.Rows[i]["tons"].ToString();
                    row.Cells["price"].Value           = table.Rows[i]["price"].ToString();
                    row.Cells["money"].Value           = table.Rows[i]["money"].ToString();
                    row.Cells["returnGoodsAdd"].Value  = table.Rows[i]["returnGoodsAdd"].ToString();
                    row.Cells["fishId"].Value          = table.Rows[i]["fishId"].ToString();
                    row.Cells["freight"].Value         = table.Rows[i]["freight"].ToString();
                    row.Cells["cost"].Value            = table.Rows[i]["cost"].ToString();
                    row.Cells["loss"].Value            = table.Rows[i]["loss"].ToString();
                }
            }
            else
            {
                MessageBox.Show("查无数据!");
            }
            return(base.Query());
        }
Beispiel #4
0
 public FormReturnAssociation(string Numbering)
 {
     InitializeComponent(); ReadColumnConfig(dataGridView1, "Set_140");
     tmiQuery.Visible    = false;
     tmiSave.Visible     = false;
     tmiReview.Visible   = false;
     tmiprint.Visible    = false;
     tmiPrevious.Visible = false;
     tmiNext.Visible     = false;
     tmiModify.Visible   = false;
     tmiExport.Visible   = false;
     tmiDelete.Visible   = false;
     tmiClose.Visible    = false;
     tmiCancel.Visible   = false;
     tmiAdd.Visible      = true;
     _bll = new FishBll.Bll.ReturnReceiptBll();
     if (Numbering != "" && Numbering != null)
     {
         name    = Numbering; Query();
         getname = Numbering;
     }
 }
Beispiel #5
0
 private void FormOutboundOrderQuery_Load(object sender, EventArgs e)
 {
     FishBll.Bll.ReturnReceiptBll _bll = new FishBll.Bll.ReturnReceiptBll( );
     comboBox1.DataSource    = _bll.getCodeT( );
     comboBox1.DisplayMember = "code";
 }