Ejemplo n.º 1
0
 private void txtconProtein_Click(object sender, EventArgs e)
 {
     if (_bll.Exists(txtCodeNum.Text))
     {
         FormPurchaseAppFishInfo form = new FormPurchaseAppFishInfo(txtCodeNum.Text);
         if (form.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         FishEntity.PurchaseAppFishInfoEntity Caig = form.getModel;
         if (Caig == null)
         {
             return;
         }
         txtconProtein.Text = Caig.conProtein;
         txtconTVN.Text     = Caig.conTVN;
         txtconFFA.Text     = Caig.conFFA;
         txtconZF.Text      = Caig.conZF;
         txtconSHY.Text     = Caig.conSHY;
         txtconS.Text       = Caig.conS;
         txtconSF.Text      = Caig.conSF;
         txtconZA.Text      = Caig.conZA;
         txtconHF.Text      = Caig.conHF;
         txtconSJ.Text      = Caig.conSJ;
         txtconLAS.Text     = Caig.conLAS;
         txtconDAS.Text     = Caig.conDAS;
         txtDollar.Text     = Caig.priceMY.ToString();
         AddShuiYin.ClearWatermark(txtconProtein);
     }
     else
     {
         MessageBox.Show("采购申请单,订单明细无数据!");
     }
 }
Ejemplo n.º 2
0
        public FormPurchaseAppFish(FishEntity.PurchaseAppFishInfoEntity entity)
        {
            InitializeComponent( );

            this.model = entity;
            setValue( );

            tmiQuery.Visible = tmiAdd.Visible = tmiCancel.Visible = tmiClose.Visible = tmiDelete.Visible = tmiExport.Visible = tmiModify.Visible = tmiNext.Visible = tmiPrevious.Visible = tmiprint.Visible = tmiReview.Visible = false;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 删除数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Delete(FishEntity.PurchaseAppFishInfoEntity model)
        {
            StringBuilder strSql = new StringBuilder( );

            strSql.AppendFormat("DELETE FROM t_purchaseappfishinfo WHERE code='{0}' and fishId='{1}'", model.code, model.fishId);

            int rows = MySqlHelper.ExecuteSql(strSql.ToString( ));

            return(rows > 0 ? true : false);
        }
Ejemplo n.º 4
0
        public override int Add()
        {
            model      = new FishEntity.PurchaseAppFishInfoEntity();
            model.code = getname;
            FormPurchaseAppFish form = new FormPurchaseAppFish(model);

            form.ShowInTaskbar = false;
            form.RefreshEvent += form_RefreshEvent;
            form.Show();
            return(base.Add());
        }
Ejemplo n.º 5
0
        public FormPurchaseAppFishInfo(string purNum)
        {
            InitializeComponent( ); ReadColumnConfig(dataGridView1, "Set_132");

            _bll    = new FishBll.Bll.PurchaseAppFishInfoBll( );
            model   = new FishEntity.PurchaseAppFishInfoEntity( );
            getname = purNum;
            if (!string.IsNullOrEmpty(purNum))
            {
                strWhere += " AND code='" + purNum + "'";
            }
            else
            {
                strWhere = "1=1";
            }

            Query( );
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 保存数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool Save(FishEntity.PurchaseAppFishInfoEntity model)
        {
            StringBuilder strSql = new StringBuilder( );

            strSql.AppendFormat("SELECT COUNT(1) FROM t_purchaseappfishinfo WHERE code='{0}' and fishId='{1}'", model.code, model.fishId);

            int rows = 0;

            if (MySqlHelper.Exists(strSql.ToString( )))
            {
                rows = Edit(strSql, model);
            }
            else
            {
                rows = Add(strSql, model);
            }

            return(rows > 0 ? true : false);
        }
Ejemplo n.º 7
0
        public override int Delete( )
        {
            //if ( string . IsNullOrEmpty ( model.code ) )
            //{
            //    MessageBox . Show ( "请选择采购合同编号" );
            //    return 0;
            //}
            //if ( string . IsNullOrEmpty ( model.fishId ) )
            //{
            //    MessageBox . Show ( "请选择鱼粉id" );
            //    return 0;
            //}
            if (dataGridView1.CurrentCell == null)
            {
                MessageBox.Show("请选择要编辑的行");
                return(0);
            }
            if (dataGridView1.CurrentRow.Cells["fishId"].Value == null && dataGridView1.CurrentRow.Cells["fishId"].Value.ToString() == "" && dataGridView1.CurrentRow.Cells["code"].Value == null && dataGridView1.CurrentRow.Cells["code"].Value.ToString() == "")
            {
                return(0);
            }
            FishEntity.PurchaseAppFishInfoEntity entity = new FishEntity.PurchaseAppFishInfoEntity();
            entity.fishId = dataGridView1.CurrentRow.Cells["fishId"].Value.ToString();
            entity.code   = dataGridView1.CurrentRow.Cells["code"].Value.ToString();
            if (entity == null)
            {
                MessageBox.Show("请选择需要编辑的行");
                return(0);
            }
            result = _bll.Delete(entity);
            if (result == false)
            {
                MessageBox.Show("删除失败");
            }
            else
            {
                Query( );
            }

            return(base.Delete( ));
        }
Ejemplo n.º 8
0
 private void txtFishMealId_Click(object sender, EventArgs e)
 {
     FishBll.Bll.PurcurementContractBll bll = new FishBll.Bll.PurcurementContractBll();
     if (bll.Exists(txtCNumbering.Text))
     {
         FormPurchaseAppFishInfo form = new FormPurchaseAppFishInfo(txtCNumbering.Text);
         if (form.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         FishEntity.PurchaseAppFishInfoEntity Caig = form.getModel;
         if (Caig == null)
         {
             return;
         }
         txtFishMealId.Text = Caig.fishId;
     }
     else
     {
         MessageBox.Show("采购申请单,订单明细无数据!");
     }
 }
Ejemplo n.º 9
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex < 0 || e.RowIndex < 0)
     {
         return;
     }
     if (dataGridView1.Columns [e.ColumnIndex].Name.Equals("fishId", StringComparison.OrdinalIgnoreCase))
     {
         model.code           = dataGridView1.Rows [e.RowIndex].Cells ["code"].Value.ToString( );
         model.fishId         = dataGridView1.Rows [e.RowIndex].Cells ["fishId"].Value.ToString( );
         model.specifications = dataGridView1.Rows [e.RowIndex].Cells ["specifications"].Value.ToString( );
         model.country        = dataGridView1.Rows [e.RowIndex].Cells ["country"].Value.ToString( );
         model.shipName       = dataGridView1.Rows [e.RowIndex].Cells ["shipName"].Value.ToString( );
         model.billName       = dataGridView1.Rows [e.RowIndex].Cells ["billName"].Value.ToString( );
         model.brand          = dataGridView1.Rows [e.RowIndex].Cells ["brand"].Value.ToString( );
         model.choise         = dataGridView1.Rows [e.RowIndex].Cells ["choise"].Value.ToString( );
         string str = dataGridView1.Rows [e.RowIndex].Cells ["Money"].Value.ToString( );
         model.money         = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         str                 = dataGridView1.Rows [e.RowIndex].Cells ["num"].Value.ToString( );
         model.num           = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         str                 = (dataGridView1.Rows [e.RowIndex].Cells ["price"].Value.ToString( ) == null?string.Empty: dataGridView1.Rows[e.RowIndex].Cells["price"].Value.ToString());
         model.price         = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         model.conProtein    = dataGridView1.Rows [e.RowIndex].Cells ["conProtein"].Value.ToString( );
         model.conTVN        = dataGridView1.Rows [e.RowIndex].Cells ["conTVN"].Value.ToString( );
         model.conZA         = dataGridView1.Rows [e.RowIndex].Cells ["conZA"].Value.ToString( );
         model.conFFA        = dataGridView1.Rows [e.RowIndex].Cells ["conFFA"].Value.ToString( );
         model.conZF         = dataGridView1.Rows [e.RowIndex].Cells ["conZF"].Value.ToString( );
         model.conSF         = dataGridView1.Rows [e.RowIndex].Cells ["conSF"].Value.ToString( );
         model.conSHY        = dataGridView1.Rows [e.RowIndex].Cells ["conSHY"].Value.ToString( );
         model.conS          = dataGridView1.Rows [e.RowIndex].Cells ["conS"].Value.ToString( );
         model.conSJ         = dataGridView1.Rows [e.RowIndex].Cells ["conSJ"].Value.ToString( );
         model.conHF         = dataGridView1.Rows [e.RowIndex].Cells ["conHF"].Value.ToString( );
         model.conLAS        = dataGridView1.Rows [e.RowIndex].Cells ["conLAS"].Value.ToString( );
         model.conDAS        = dataGridView1.Rows [e.RowIndex].Cells ["conDAS"].Value.ToString( );
         str                 = dataGridView1.Rows[e.RowIndex].Cells["priceMY"].Value.ToString();
         model.priceMY       = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         str                 = dataGridView1.Rows[e.RowIndex].Cells["EexchangeRate"].Value.ToString();
         model.EexchangeRate = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         str                 = dataGridView1.Rows [e.RowIndex].Cells ["fastShipDate"].Value.ToString( );
         if (string.IsNullOrEmpty(str))
         {
             model.fastshipdate = null;
         }
         else
         {
             model.fastshipdate = Convert.ToDateTime(str);
         }
         str = dataGridView1.Rows [e.RowIndex].Cells ["lastShipDate"].Value.ToString( );
         if (string.IsNullOrEmpty(str))
         {
             model.lastshipdate = null;
         }
         else
         {
             model.lastshipdate = Convert.ToDateTime(str);
         }
         FormPurchaseAppFish from = new FormPurchaseAppFish(model);
         if (from.ShowDialog( ) == DialogResult.OK)
         {
             model = from.getModel;
             if (model == null)
             {
                 return;
             }
             dataGridView1.Rows [e.RowIndex].Cells ["code"].Value           = model.code;
             dataGridView1.Rows [e.RowIndex].Cells ["fishId"].Value         = model.fishId;
             dataGridView1.Rows [e.RowIndex].Cells ["specifications"].Value = model.specifications;
             dataGridView1.Rows [e.RowIndex].Cells ["country"].Value        = model.country;
             dataGridView1.Rows [e.RowIndex].Cells ["brand"].Value          = model.brand;
             dataGridView1.Rows [e.RowIndex].Cells ["shipName"].Value       = model.shipName;
             dataGridView1.Rows [e.RowIndex].Cells ["billName"].Value       = model.billName;
             dataGridView1.Rows [e.RowIndex].Cells ["Money"].Value          = model.money;
             dataGridView1.Rows [e.RowIndex].Cells ["num"].Value            = model.num;
             dataGridView1.Rows [e.RowIndex].Cells ["conProtein"].Value     = model.conProtein;
             dataGridView1.Rows [e.RowIndex].Cells ["conTVN"].Value         = model.conTVN;
             dataGridView1.Rows [e.RowIndex].Cells ["conZA"].Value          = model.conZA;
             dataGridView1.Rows [e.RowIndex].Cells ["conFFA"].Value         = model.conFFA;
             dataGridView1.Rows [e.RowIndex].Cells ["conZF"].Value          = model.conZF;
             dataGridView1.Rows [e.RowIndex].Cells ["conSF"].Value          = model.conSF;
             dataGridView1.Rows [e.RowIndex].Cells ["conSHY"].Value         = model.conSHY;
             dataGridView1.Rows [e.RowIndex].Cells ["conS"].Value           = model.conS;
             dataGridView1.Rows [e.RowIndex].Cells ["conSJ"].Value          = model.conSJ;
             dataGridView1.Rows [e.RowIndex].Cells ["conHF"].Value          = model.conHF;
             dataGridView1.Rows [e.RowIndex].Cells ["conLAS"].Value         = model.conLAS;
             dataGridView1.Rows [e.RowIndex].Cells ["conDAS"].Value         = model.conDAS;
             dataGridView1.Rows [e.RowIndex].Cells ["choise"].Value         = model.choise;
             dataGridView1.Rows [e.RowIndex].Cells ["fastShipDate"].Value   = model.fastshipdate;
             dataGridView1.Rows [e.RowIndex].Cells ["lastShipDate"].Value   = model.lastshipdate;
             dataGridView1.Rows[e.RowIndex].Cells["priceMY"].Value          = model.priceMY;
             dataGridView1.Rows[e.RowIndex].Cells["EexchangeRate"].Value    = model.EexchangeRate;
         }
     }
     else if (!dataGridView1.Columns[e.ColumnIndex].Name.Equals("fishId", StringComparison.OrdinalIgnoreCase))
     {
         _model = new FishEntity.PurchaseAppFishInfoEntity();
         string str = (dataGridView1.Rows[e.RowIndex].Cells["Money"].Value.ToString() == null ? string.Empty : dataGridView1.Rows[e.RowIndex].Cells["Money"].Value.ToString());
         _model.money      = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         _model.conProtein = dataGridView1.Rows[e.RowIndex].Cells["conProtein"].Value.ToString();
         _model.conTVN     = dataGridView1.Rows[e.RowIndex].Cells["conTVN"].Value.ToString();
         _model.conZA      = dataGridView1.Rows[e.RowIndex].Cells["conZA"].Value.ToString();
         _model.conFFA     = dataGridView1.Rows[e.RowIndex].Cells["conFFA"].Value.ToString();
         _model.conZF      = dataGridView1.Rows[e.RowIndex].Cells["conZF"].Value.ToString();
         _model.conSF      = dataGridView1.Rows[e.RowIndex].Cells["conSF"].Value.ToString();
         _model.conSHY     = dataGridView1.Rows[e.RowIndex].Cells["conSHY"].Value.ToString();
         _model.conS       = dataGridView1.Rows[e.RowIndex].Cells["conS"].Value.ToString();
         _model.conSJ      = dataGridView1.Rows[e.RowIndex].Cells["conSJ"].Value.ToString();
         _model.conHF      = dataGridView1.Rows[e.RowIndex].Cells["conHF"].Value.ToString();
         _model.conLAS     = dataGridView1.Rows[e.RowIndex].Cells["conLAS"].Value.ToString();
         _model.conDAS     = dataGridView1.Rows[e.RowIndex].Cells["conDAS"].Value.ToString();
         str               = dataGridView1.Rows[e.RowIndex].Cells["priceMY"].Value.ToString();
         _model.fishId     = dataGridView1.Rows[e.RowIndex].Cells["fishId"].Value.ToString();
         _model.priceMY    = string.IsNullOrEmpty(str) == true ? 0 : Convert.ToDecimal(str);
         this.DialogResult = DialogResult.OK;
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 保存数据
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Save(FishEntity.PurchaseAppFishInfoEntity model)
 {
     return(dal.Save(model));
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public bool Delete(FishEntity.PurchaseAppFishInfoEntity model)
 {
     return(dal.Delete(model));
 }
Ejemplo n.º 12
0
 public FishEntity.PurchaseAppFishInfoEntity getModel(DataRow row)
 {
     FishEntity.PurchaseAppFishInfoEntity model = new FishEntity.PurchaseAppFishInfoEntity( );
     if (row != null)
     {
         if (row ["id"] != null && row ["id"].ToString( ) != "")
         {
             model.id = int.Parse(row ["id"].ToString( ));
         }
         if (row ["code"] != null)
         {
             model.code = row ["code"].ToString( );
         }
         if (row ["fishId"] != null)
         {
             model.fishId = row ["fishId"].ToString( );
         }
         if (row ["specifications"] != null)
         {
             model.specifications = row ["specifications"].ToString( );
         }
         if (row ["country"] != null)
         {
             model.country = row ["country"].ToString( );
         }
         if (row ["brand"] != null)
         {
             model.brand = row ["brand"].ToString( );
         }
         if (row ["shipName"] != null)
         {
             model.shipName = row ["shipName"].ToString( );
         }
         if (row ["billName"] != null)
         {
             model.billName = row ["billName"].ToString( );
         }
         if (row ["Money"] != null && row ["Money"].ToString( ) != "")
         {
             model.money = decimal.Parse(row ["Money"].ToString( ));
         }
         if (row ["num"] != null && row ["num"].ToString( ) != "")
         {
             model.num = decimal.Parse(row ["num"].ToString( ));
         }
         if (row["priceMY"] != null && row["priceMY"].ToString() != "")
         {
             model.priceMY = decimal.Parse(row["priceMY"].ToString());
         }
         if (row["EexchangeRate"] != null && row["EexchangeRate"].ToString() != "")
         {
             model.EexchangeRate = decimal.Parse(row["EexchangeRate"].ToString());
         }
         if (row["price"] != null && row["price"].ToString() != "")
         {
             model.price = decimal.Parse(row["price"].ToString());
         }
         if (row ["conProtein"] != null)
         {
             model.conProtein = row ["conProtein"].ToString( );
         }
         if (row ["conTVN"] != null)
         {
             model.conTVN = row ["conTVN"].ToString( );
         }
         if (row ["conZA"] != null)
         {
             model.conZA = row ["conZA"].ToString( );
         }
         if (row ["conFFA"] != null)
         {
             model.conFFA = row ["conFFA"].ToString( );
         }
         if (row ["conZF"] != null)
         {
             model.conZF = row ["conZF"].ToString( );
         }
         if (row ["conSF"] != null)
         {
             model.conSF = row ["conSF"].ToString( );
         }
         if (row ["conSHY"] != null)
         {
             model.conSHY = row ["conSHY"].ToString( );
         }
         if (row ["conS"] != null)
         {
             model.conS = row ["conS"].ToString( );
         }
         if (row ["conSJ"] != null)
         {
             model.conSJ = row ["conSJ"].ToString( );
         }
         if (row ["conHF"] != null)
         {
             model.conHF = row ["conHF"].ToString( );
         }
         if (row ["conLAS"] != null)
         {
             model.conLAS = row ["conLAS"].ToString( );
         }
         if (row ["conDAS"] != null)
         {
             model.conDAS = row ["conDAS"].ToString( );
         }
         if (row ["choise"] != null)
         {
             model.choise = row ["choise"].ToString( );
         }
         if (row ["delPort"] != null)
         {
             model.delPort = row ["delPort"].ToString( );
         }
         if (row ["fastShipDate"] != null && row ["fastShipDate"].ToString( ) != "")
         {
             model.fastshipdate = DateTime.Parse(row ["fastShipDate"].ToString( ));
         }
         if (row ["lastShipDate"] != null && row ["lastShipDate"].ToString( ) != "")
         {
             model.lastshipdate = DateTime.Parse(row ["lastShipDate"].ToString( ));
         }
     }
     return(model);
 }
Ejemplo n.º 13
0
        int Add(StringBuilder strSql, FishEntity.PurchaseAppFishInfoEntity model)
        {
            strSql = new StringBuilder( );
            strSql.Append("insert into t_purchaseappfishinfo(");
            strSql.Append("code,fishId,specifications,country,brand,shipName,billName,Money,num,price,conProtein,conTVN,conZA,conFFA,conZF,conSF,conSHY,conS,conSJ,conHF,conLAS,conDAS,choise,fastShipDate,lastShipDate,createTime,createMan,priceMY,EexchangeRate)");
            strSql.Append(" values (");
            strSql.Append("@code,@fishId,@specifications,@country,@brand,@shipName,@billName,@Money,@num,@price,@conProtein,@conTVN,@conZA,@conFFA,@conZF,@conSF,@conSHY,@conS,@conSJ,@conHF,@conLAS,@conDAS,@choise,@fastShipDate,@lastShipDate,@createTime,@createMan,@priceMY,@EexchangeRate)");
            MySqlParameter [] parameters =
            {
                new MySqlParameter("@code",           MySqlDbType.VarChar,   45),
                new MySqlParameter("@fishId",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@specifications", MySqlDbType.VarChar,   45),
                new MySqlParameter("@country",        MySqlDbType.VarChar,   45),
                new MySqlParameter("@brand",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@shipName",       MySqlDbType.VarChar,   45),
                new MySqlParameter("@billName",       MySqlDbType.VarChar,   45),
                new MySqlParameter("@Money",          MySqlDbType.Decimal,   10),
                new MySqlParameter("@num",            MySqlDbType.Decimal,   10),
                new MySqlParameter("@price",          MySqlDbType.Decimal,   10),
                new MySqlParameter("@conProtein",     MySqlDbType.VarChar,   45),
                new MySqlParameter("@conTVN",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conZA",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conFFA",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conZF",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conSF",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conSHY",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conS",           MySqlDbType.VarChar,   45),
                new MySqlParameter("@conSJ",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conHF",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conLAS",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conDAS",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@choise",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@fastShipDate",   MySqlDbType.DateTime),
                new MySqlParameter("@lastShipDate",   MySqlDbType.DateTime),
                new MySqlParameter("@createTime",     MySqlDbType.DateTime),
                new MySqlParameter("@createMan",      MySqlDbType.VarChar,   45),
                new MySqlParameter("@priceMY",        MySqlDbType.Decimal,   10),
                new MySqlParameter("EexchangeRate",   MySqlDbType.Decimal, 10)
            };
            parameters [0].Value  = model.code;
            parameters [1].Value  = model.fishId;
            parameters [2].Value  = model.specifications;
            parameters [3].Value  = model.country;
            parameters [4].Value  = model.brand;
            parameters [5].Value  = model.shipName;
            parameters [6].Value  = model.billName;
            parameters [7].Value  = model.money;
            parameters [8].Value  = model.num;
            parameters [9].Value  = model.price;
            parameters [10].Value = model.conProtein;
            parameters [11].Value = model.conTVN;
            parameters [12].Value = model.conZA;
            parameters [13].Value = model.conFFA;
            parameters [14].Value = model.conZF;
            parameters [15].Value = model.conSF;
            parameters [16].Value = model.conSHY;
            parameters [17].Value = model.conS;
            parameters [18].Value = model.conSJ;
            parameters [19].Value = model.conHF;
            parameters [20].Value = model.conLAS;
            parameters [21].Value = model.conDAS;
            parameters [22].Value = model.choise;
            parameters [23].Value = model.fastshipdate;
            parameters [24].Value = model.lastshipdate;
            parameters [25].Value = model.createTime;
            parameters [26].Value = model.createMan;
            parameters[27].Value  = model.priceMY;
            parameters[28].Value  = model.EexchangeRate;

            return(MySqlHelper.ExecuteSql(strSql.ToString( ), parameters));
        }
Ejemplo n.º 14
0
        int Edit(StringBuilder strSql, FishEntity.PurchaseAppFishInfoEntity model)
        {
            strSql = new StringBuilder( );
            strSql.Append("update t_purchaseappfishinfo set ");
            strSql.Append("specifications=@specifications,");
            strSql.Append("country=@country,");
            strSql.Append("brand=@brand,");
            strSql.Append("shipName=@shipName,");
            strSql.Append("billName=@billName,");
            strSql.Append("Money=@Money,");
            strSql.Append("num=@num,");
            strSql.Append("price=@price,");
            strSql.Append("conProtein=@conProtein,");
            strSql.Append("conTVN=@conTVN,");
            strSql.Append("conZA=@conZA,");
            strSql.Append("conFFA=@conFFA,");
            strSql.Append("conZF=@conZF,");
            strSql.Append("conSF=@conSF,");
            strSql.Append("conSHY=@conSHY,");
            strSql.Append("conS=@conS,");
            strSql.Append("conSJ=@conSJ,");
            strSql.Append("conHF=@conHF,");
            strSql.Append("conLAS=@conLAS,");
            strSql.Append("conDAS=@conDAS,");
            strSql.Append("choise=@choise,");
            strSql.Append("fastShipDate=@fastShipDate,");
            strSql.Append("lastShipDate=@lastShipDate,");
            strSql.Append("modifyTime=@modifyTime,");
            strSql.Append("priceMY=@priceMY,");
            strSql.Append("EexchangeRate=@EexchangeRate,");
            strSql.Append("modifyMan=@modifyMan ");
            strSql.Append("where code=@code and ");
            strSql.Append("fishId=@fishId");
            MySqlParameter [] parameters =
            {
                new MySqlParameter("@code",           MySqlDbType.VarChar,   45),
                new MySqlParameter("@fishId",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@specifications", MySqlDbType.VarChar,   45),
                new MySqlParameter("@country",        MySqlDbType.VarChar,   45),
                new MySqlParameter("@brand",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@shipName",       MySqlDbType.VarChar,   45),
                new MySqlParameter("@billName",       MySqlDbType.VarChar,   45),
                new MySqlParameter("@Money",          MySqlDbType.Decimal,   10),
                new MySqlParameter("@num",            MySqlDbType.Decimal,   10),
                new MySqlParameter("@price",          MySqlDbType.Decimal,   10),
                new MySqlParameter("@conProtein",     MySqlDbType.VarChar,   45),
                new MySqlParameter("@conTVN",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conZA",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conFFA",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conZF",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conSF",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conSHY",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conS",           MySqlDbType.VarChar,   45),
                new MySqlParameter("@conSJ",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conHF",          MySqlDbType.VarChar,   45),
                new MySqlParameter("@conLAS",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@conDAS",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@choise",         MySqlDbType.VarChar,   45),
                new MySqlParameter("@fastShipDate",   MySqlDbType.DateTime),
                new MySqlParameter("@lastShipDate",   MySqlDbType.DateTime),
                new MySqlParameter("@modifyTime",     MySqlDbType.DateTime),
                new MySqlParameter("@modifyMan",      MySqlDbType.VarChar,   45),
                new MySqlParameter("@priceMY",        MySqlDbType.Decimal,   10),
                new MySqlParameter("@EexchangeRate",  MySqlDbType.Decimal, 10)
            };
            parameters [0].Value  = model.code;
            parameters [1].Value  = model.fishId;
            parameters [2].Value  = model.specifications;
            parameters [3].Value  = model.country;
            parameters [4].Value  = model.brand;
            parameters [5].Value  = model.shipName;
            parameters [6].Value  = model.billName;
            parameters [7].Value  = model.money;
            parameters [8].Value  = model.num;
            parameters [9].Value  = model.price;
            parameters [10].Value = model.conProtein;
            parameters [11].Value = model.conTVN;
            parameters [12].Value = model.conZA;
            parameters [13].Value = model.conFFA;
            parameters [14].Value = model.conZF;
            parameters [15].Value = model.conSF;
            parameters [16].Value = model.conSHY;
            parameters [17].Value = model.conS;
            parameters [18].Value = model.conSJ;
            parameters [19].Value = model.conHF;
            parameters [20].Value = model.conLAS;
            parameters [21].Value = model.conDAS;
            parameters [22].Value = model.choise;
            parameters [23].Value = model.fastshipdate;
            parameters [24].Value = model.lastshipdate;
            parameters [25].Value = model.modifyTime;
            parameters [26].Value = model.modifyMan;
            parameters[27].Value  = model.priceMY;
            parameters[28].Value  = model.EexchangeRate;

            return(MySqlHelper.ExecuteSql(strSql.ToString( ), parameters));
        }