Пример #1
0
        protected void AddGroupRow(List <FishEntity.ProductQuoteVo> list)
        {
            if (list == null || list.Count < 1)
            {
                return;
            }
            IDictionary <string, FishEntity.ProductQuoteVo> groups = new Dictionary <string, FishEntity.ProductQuoteVo>();
            string specification = list[0].specification;

            foreach (FishEntity.ProductQuoteVo vo in list)
            {
                if (groups.ContainsKey(vo.specification))
                {
                    FishEntity.ProductQuoteVo group = groups[vo.specification];
                    group.quoteweight += vo.quoteweight;
                }
                else
                {
                    FishEntity.ProductQuoteVo newvo = new FishEntity.ProductQuoteVo();
                    newvo.specification = vo.specification;
                    newvo.quoteweight   = vo.quoteweight;
                    newvo.code          = "分组小计";
                    groups.Add(vo.specification, newvo);
                }
            }

            foreach (KeyValuePair <string, FishEntity.ProductQuoteVo> pair in groups)
            {
                int idx = list.FindLastIndex((i) => { return(i.specification.Equals(pair.Key)); });
                if (idx >= 0)
                {
                    list.Insert(idx + 1, pair.Value);
                }
            }
        }
Пример #2
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString() == "分组小计")
            {
                return;
            }
            if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("isdelete1", StringComparison.OrdinalIgnoreCase) == true)
            {
                boolget = true;
            }
            else
            {
                boolget = false;
                Add();
                SeeFishDetail(e.ColumnIndex, e.RowIndex);
            }
            if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) == false)
            {
                this.DialogResult    = DialogResult.Cancel;
                _model               = new FishEntity.ProductQuoteVo();
                _model.code          = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString();
                _model.specification = dataGridView1.Rows[e.RowIndex].Cells["specification"].Value.ToString();
                _model.nature        = dataGridView1.Rows[e.RowIndex].Cells["nature"].Value.ToString();
                _model.brand         = dataGridView1.Rows[e.RowIndex].Cells["brand"].Value.ToString();
                _model.billofgoods   = dataGridView1.Rows[e.RowIndex].Cells["billofgoods"].Value.ToString();

                if (dataGridView1.Rows[e.RowIndex].Cells["quote_protein"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_protein"].Value.ToString() != "")
                {
                    _model.quote_protein = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_protein"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["quote_tvn"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_tvn"].Value.ToString() != "")
                {
                    _model.quote_tvn = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_tvn"].Value.ToString());
                }

                if (dataGridView1.Rows[e.RowIndex].Cells["quote_amine"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_amine"].Value.ToString() != "")
                {
                    _model.quote_amine = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_amine"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["quote_ffa"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_ffa"].Value.ToString() != "")
                {
                    _model.quote_ffa = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_ffa"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["quote_sandsalt"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_sandsalt"].Value.ToString() != "")
                {
                    _model.quote_sandsalt = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_sandsalt"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["quote_graypart"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_graypart"].Value.ToString() != "")
                {
                    _model.quote_graypart = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_graypart"].Value.ToString());
                }

                _model.quotermb = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quotermb"].Value.ToString());
                //_model.quotedollars = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quotedollars"].Value.ToString());
                this.DialogResult = DialogResult.OK;
            }
        }
Пример #3
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex < 0 && e.RowIndex < 0)
     {
         this.DialogResult = DialogResult.Cancel;
     }
     _model            = new FishEntity.ProductQuoteVo();
     _model.code       = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString();
     this.DialogResult = DialogResult.OK;
 }
Пример #4
0
        protected void SetValue(int rowidx, string code)
        {
            if (_list == null)
            {
                return;
            }
            FishEntity.ProductQuoteVo vo = _list.Find((i) => { return(i.code == code); });
            if (vo == null)
            {
                return;
            }

            dataGridView1.Rows[rowidx].Cells["quote_protein"].Value  = vo.quote_protein == 0 ? "" : vo.quote_protein.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_tvn"].Value      = vo.quote_tvn == 0 ? "" : vo.quote_tvn.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_amine"].Value    = vo.quote_amine == 0 ? "" : vo.quote_amine.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_sandsalt"].Value = vo.quote_sandsalt == 0 ? "" : vo.quote_sandsalt.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_ffa"].Value      = vo.quote_ffa == 0 ? "" : vo.quote_ffa.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_graypart"].Value = vo.quote_graypart == 0 ? "" : vo.quote_graypart.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_fat"].Value      = vo.quote_fat == 0 ? "" : vo.quote_fat.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_water"].Value    = vo.quote_water == 0 ? "" : vo.quote_water.ToString();
            dataGridView1.Rows[rowidx].Cells["quote_sand"].Value     = vo.quote_sand == 0 ? "" : vo.quote_sand.ToString();
        }
Пример #5
0
        private void fishId_DoubleClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtdataForm.Text))
            {
                MessageBox.Show("请选择数据来源");
                return;
            }

            if (txtdataForm.Text.Equals("自制仓库"))
            {
                FormNewSelfcontrolWare form = new FormNewSelfcontrolWare( );//FormSelfcontrolWare
                if (form.ShowDialog( ) == DialogResult.OK)
                {
                    FishEntity.BatchSheetsEntity _model = form.getModel;
                    fishId.Text     = _model.fishId;
                    price.Text      = _model.price.ToString( );
                    tvn.Text        = _model.tvn;
                    protein.Text    = _model.protein;
                    ash.Text        = _model.ash;
                    histamine.Text  = _model.histamine;
                    salt.Text       = _model.salt;
                    las.Text        = _model.las;
                    das.Text        = _model.das;
                    country.Text    = _model.country;
                    qualitySpe.Text = _model.qualitySpe;
                    brand.Text      = _model.brand;
                }
            }
            else if (txtdataForm.Text.Equals("自营仓库"))
            {
                FormNewPriWarehouse form = new FormNewPriWarehouse();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    price.Text      = _model.confirmrmb.ToString();
                    tvn.Text        = _model.sgs_tvn.ToString();
                    protein.Text    = _model.sgs_protein.ToString();
                    ash.Text        = _model.sgs_graypart.ToString();
                    histamine.Text  = _model.sgs_amine.ToString();
                    FFA.Text        = _model.sgs_ffa.ToString();;
                    salt.Text       = _model.domestic_sandsalt.ToString();
                    las.Text        = _model.domestic_lysine.ToString();
                    das.Text        = _model.domestic_methionine.ToString();
                    qualitySpe.Text = _model.specification;
                    country.Text    = _model.nature;
                    brand.Text      = _model.brand;
                }
            }
            else if (txtdataForm.Text.Equals("报盘"))
            {
                FormQuote form = new FormQuote();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    tvn.Text        = _model.quote_tvn.ToString();
                    protein.Text    = _model.quote_protein.ToString();
                    ash.Text        = _model.quote_graypart.ToString();
                    histamine.Text  = _model.quote_amine.ToString();
                    FFA.Text        = _model.quote_ffa.ToString();;
                    salt.Text       = _model.quote_sandsalt.ToString();
                    qualitySpe.Text = _model.specification;
                    brand.Text      = _model.brand;
                    country.Text    = _model.nature;
                }
            }
            else if (txtdataForm.Text.Equals("现货"))
            {
                FormSpot form = new FormSpot();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    price.Text      = _model.quotermb.ToString();
                    tvn.Text        = _model.sgs_tvn.ToString();
                    protein.Text    = _model.sgs_protein.ToString();
                    ash.Text        = _model.sgs_graypart.ToString();
                    histamine.Text  = _model.sgs_amine.ToString();
                    FFA.Text        = _model.sgs_ffa.ToString();;
                    salt.Text       = _model.sgs_sandsalt.ToString();
                    qualitySpe.Text = _model.specification;
                    brand.Text      = _model.brand;
                    country.Text    = _model.nature;
                }
            }
            else if (txtdataForm.Text.Equals("确盘"))
            {
                FormConfirm form = new FormConfirm();//
                if (form.ShowDialog() == DialogResult.OK)
                {
                    FishEntity.ProductQuoteVo _model = form.getModel;
                    fishId.Text     = _model.code;
                    price.Text      = _model.quotermb.ToString();
                    tvn.Text        = _model.quote_tvn.ToString();
                    protein.Text    = _model.quote_protein.ToString();
                    ash.Text        = _model.quote_graypart.ToString();
                    histamine.Text  = _model.quote_amine.ToString();
                    FFA.Text        = _model.quote_ffa.ToString();;
                    salt.Text       = _model.quote_sandsalt.ToString();
                    qualitySpe.Text = _model.specification;
                    brand.Text      = _model.brand;
                    country.Text    = _model.nature;
                }
            }
        }
Пример #6
0
        public FishEntity.ProductQuoteVo DataRowToModel(DataRow row)
        {
            FishEntity.ProductQuoteVo model = new FishEntity.ProductQuoteVo();
            if (row != null)
            {
                #region product
                if (row["Display"].ToString() == "1")
                {
                    model.Display = 1;
                }
                if (row["Quote_id"] != null && row["Quote_id"].ToString() != "")
                {
                    model.Quote_id = int.Parse(row["Quote_id"].ToString());
                }
                else if (row["Display"].ToString() != "1")
                {
                    model.Display = 0;
                }
                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["name"] != null)
                {
                    model.name = row["name"].ToString();
                }
                if (row["brand"] != null)
                {
                    model.brand = row["brand"].ToString();
                }
                if (row["quotEexchangeRate"] != null)
                {
                    model.QuotEexchangeRate = row["quotEexchangeRate"].ToString();
                }
                if (row["PlaceOfDelivery"] != null)
                {
                    model.PlaceOfDelivery = row["PlaceOfDelivery"].ToString();
                }
                if (row["state"] != null)
                {
                    model.state = row["state"].ToString();
                    //查询出状态值对应的状态名称
                    FishEntity.SystemDataType item = FishEntity.Variable.StateList.Find((i) => { return(i.Code.Equals(model.state)); });
                    if (item != null)
                    {
                        model.statename = item.Name;
                    }
                }
                //if (row["state1"] != null)
                //{
                //    model.State1 = row["state1"].ToString();
                //    //查询出状态值对应的状态名称
                //    FishEntity.SystemDataType item = FishEntity.Variable.StateList.Find((i) => { return i.Code.Equals(model.State1); });
                //    if (item != null)
                //    {
                //        model.statename = item.Name;
                //    }
                //}
                //if (row["state2"] != null)
                //{
                //    model.State2 = row["state2"].ToString();
                //    //查询出状态值对应的状态名称
                //    FishEntity.SystemDataType item = FishEntity.Variable.StateList.Find((i) => { return i.Code.Equals(model.State2); });
                //    if (item != null)
                //    {
                //        model.statename = item.Name;
                //    }
                //}
                //if (row["state3"] != null)
                //{
                //    model.State3 = row["state1"].ToString();
                //    //查询出状态值对应的状态名称
                //    FishEntity.SystemDataType item = FishEntity.Variable.StateList.Find((i) => { return i.Code.Equals(model.State3); });
                //    if (item != null)
                //    {
                //        model.statename = item.Name;
                //    }
                //}
                //if (row["state4"] != null)
                //{
                //    model.State4 = row["state4"].ToString();
                //    //查询出状态值对应的状态名称
                //    FishEntity.SystemDataType item = FishEntity.Variable.StateList.Find((i) => { return i.Code.Equals(model.State4); });
                //    if (item != null)
                //    {
                //        model.statename = item.Name;
                //    }
                //}
                //if (row["state5"] != null)
                //{
                //    model.State1 = row["state5"].ToString();
                //    //查询出状态值对应的状态名称
                //    FishEntity.SystemDataType item = FishEntity.Variable.StateList.Find((i) => { return i.Code.Equals(model.State5); });
                //    if (item != null)
                //    {
                //        model.statename = item.Name;
                //    }
                //}
                if (row["nature"] != null)
                {
                    model.nature = row["nature"].ToString();
                }
                if (row["port"] != null)
                {
                    model.port = row["port"].ToString();
                }
                if (row["origin"] != null)
                {
                    model.origin = row["origin"].ToString();
                }
                if (row["type"] != null)
                {
                    model.type = row["type"].ToString();
                }
                if (row["getinfotime"] != null && row["getinfotime"].ToString() != "")
                {
                    model.getinfotime = DateTime.Parse(row["getinfotime"].ToString());
                }
                if (row["endinfotime"] != null && row["endinfotime"].ToString() != "")
                {
                    model.endinfotime = DateTime.Parse(row["endinfotime"].ToString());
                }
                if (row["techtype"] != null)
                {
                    model.techtype = row["techtype"].ToString();
                }
                if (row["specification"] != null)
                {
                    model.specification = row["specification"].ToString();
                }
                if (row["productdate"] != null)
                {
                    model.productdate = row["productdate"].ToString();
                }
                if (row["shelflife"] != null && row["shelflife"].ToString() != "")
                {
                    model.shelflife = int.Parse(row["shelflife"].ToString());
                }
                if (row["quality"] != null)
                {
                    model.quality = row["quality"].ToString();
                }
                if (row["manufacturers"] != null)
                {
                    model.manufacturers = row["manufacturers"].ToString();
                }
                if (row["factoryaddress"] != null)
                {
                    model.factoryaddress = row["factoryaddress"].ToString();
                }
                if (row["remark"] != null)
                {
                    model.remark = row["remark"].ToString();
                }
                if (row["weight"] != null && row["weight"].ToString() != "")
                {
                    model.weight = decimal.Parse(row["weight"].ToString());
                }
                if (row["quantity"] != null && row["quantity"].ToString() != "")
                {
                    model.quantity = int.Parse(row["quantity"].ToString());
                }
                if (row["remainweight"] != null && row["remainweight"].ToString() != "")
                {
                    model.remainweight = decimal.Parse(row["remainweight"].ToString());
                }
                if (row["remainquantity"] != null && row["remainquantity"].ToString() != "")
                {
                    model.remainquantity = int.Parse(row["remainquantity"].ToString());
                }
                if (row["homemadeweight"] != null && row["homemadeweight"].ToString() != "")
                {
                    model.homemadeweight = decimal.Parse(row["homemadeweight"].ToString());
                }
                if (row["homemadepackages"] != null && row["homemadepackages"].ToString() != "")
                {
                    model.homemadepackages = int.Parse(row["homemadepackages"].ToString());
                }
                if (row["homemadecost"] != null && row["homemadecost"].ToString() != "")
                {
                    model.homemadecost = decimal.Parse(row["homemadecost"].ToString());
                }
                if (row["homemadeunitprice"] != null && row["homemadeunitprice"].ToString() != "")
                {
                    model.homemadeunitprice = decimal.Parse(row["homemadeunitprice"].ToString());
                }
                if (row["price"] != null && row["price"].ToString() != "")
                {
                    model.price = decimal.Parse(row["price"].ToString());
                }
                if (row["arriveportdate"] != null && row["arriveportdate"].ToString() != "")
                {
                    model.arriveportdate = row["arriveportdate"].ToString();
                }
                if (row["sailingschedule"] != null)
                {
                    model.sailingschedule = row["sailingschedule"].ToString();
                }
                if (row["ownerCode"] != null)
                {
                    model.ownerCode = row["ownerCode"].ToString();
                }
                if (row["ownershortname"] != null)
                {
                    model.ownershortname = row["ownershortname"].ToString();
                }
                if (row["ownername"] != null)
                {
                    model.ownername = row["ownername"].ToString();
                }
                if (row["billofgoods"] != null)
                {
                    model.billofgoods = row["billofgoods"].ToString();
                }
                if (row["agentifcompany"] != null)
                {
                    model.agentifcompany = row["agentifcompany"].ToString();
                }
                if (row["customsofcompany"] != null)
                {
                    model.customsofcompany = row["customsofcompany"].ToString();
                }
                if (row["createtime"] != null && row["createtime"].ToString() != "")
                {
                    model.createtime = DateTime.Parse(row["createtime"].ToString());
                }
                if (row["createman"] != null)
                {
                    model.createman = row["createman"].ToString();
                }
                if (row["modifytime"] != null && row["modifytime"].ToString() != "")
                {
                    model.modifytime = DateTime.Parse(row["modifytime"].ToString());
                }
                if (row["modifyman"] != null)
                {
                    model.modifyman = row["modifyman"].ToString();
                }
                if (row["isdelete"] != null)
                {
                    model.isdelete = int.Parse(row["isdelete"].ToString());
                }
                if (row["suppliercode"] != null)
                {
                    model.suppliercode = row["suppliercode"].ToString();
                }
                if (row["supplier"] != null)
                {
                    model.supplier = row["supplier"].ToString();
                }
                if (row["quote_protein"] != null && row["quote_protein"].ToString() != "")
                {
                    model.quote_protein = decimal.Parse(row["quote_protein"].ToString());
                }
                if (row["quote_tvn"] != null && row["quote_tvn"].ToString() != "")
                {
                    model.quote_tvn = decimal.Parse(row["quote_tvn"].ToString());
                }
                if (row["quote_graypart"] != null && row["quote_graypart"].ToString() != "")
                {
                    model.quote_graypart = decimal.Parse(row["quote_graypart"].ToString());
                }
                if (row["quote_sandsalt"] != null && row["quote_sandsalt"].ToString() != "")
                {
                    model.quote_sandsalt = decimal.Parse(row["quote_sandsalt"].ToString());
                }
                if (row["quote_amine"] != null && row["quote_amine"].ToString() != "")
                {
                    model.quote_amine = decimal.Parse(row["quote_amine"].ToString());
                }
                if (row["quote_ffa"] != null && row["quote_ffa"].ToString() != "")
                {
                    model.quote_ffa = decimal.Parse(row["quote_ffa"].ToString());
                }
                if (row["quote_fat"] != null && row["quote_fat"].ToString() != "")
                {
                    model.quote_fat = decimal.Parse(row["quote_fat"].ToString());
                }
                if (row["quote_water"] != null && row["quote_water"].ToString() != "")
                {
                    model.quote_water = decimal.Parse(row["quote_water"].ToString());
                }
                if (row["quote_sand"] != null && row["quote_sand"].ToString() != "")
                {
                    model.quote_sand = decimal.Parse(row["quote_sand"].ToString());
                }
                if (row["sgs_protein"] != null && row["sgs_protein"].ToString() != "")
                {
                    model.sgs_protein = decimal.Parse(row["sgs_protein"].ToString());
                }
                if (row["sgs_tvn"] != null && row["sgs_tvn"].ToString() != "")
                {
                    model.sgs_tvn = decimal.Parse(row["sgs_tvn"].ToString());
                }
                if (row["sgs_graypart"] != null && row["sgs_graypart"].ToString() != "")
                {
                    model.sgs_graypart = decimal.Parse(row["sgs_graypart"].ToString());
                }
                if (row["sgs_sandsalt"] != null && row["sgs_sandsalt"].ToString() != "")
                {
                    model.sgs_sandsalt = decimal.Parse(row["sgs_sandsalt"].ToString());
                }
                if (row["sgs_amine"] != null && row["sgs_amine"].ToString() != "")
                {
                    model.sgs_amine = decimal.Parse(row["sgs_amine"].ToString());
                }
                if (row["sgs_ffa"] != null && row["sgs_ffa"].ToString() != "")
                {
                    model.sgs_ffa = decimal.Parse(row["sgs_ffa"].ToString());
                }
                if (row["sgs_fat"] != null && row["sgs_fat"].ToString() != "")
                {
                    model.sgs_fat = decimal.Parse(row["sgs_fat"].ToString());
                }
                if (row["sgs_water"] != null && row["sgs_water"].ToString() != "")
                {
                    model.sgs_water = decimal.Parse(row["sgs_water"].ToString());
                }
                if (row["sgs_sand"] != null && row["sgs_sand"].ToString() != "")
                {
                    model.sgs_sand = decimal.Parse(row["sgs_sand"].ToString());
                }
                if (row["label_protein"] != null && row["label_protein"].ToString() != "")
                {
                    model.label_protein = decimal.Parse(row["label_protein"].ToString());
                }
                if (row["label_tvn"] != null && row["label_tvn"].ToString() != "")
                {
                    model.label_tvn = decimal.Parse(row["label_tvn"].ToString());
                }
                if (row["label_graypart"] != null && row["label_graypart"].ToString() != "")
                {
                    model.label_graypart = decimal.Parse(row["label_graypart"].ToString());
                }
                if (row["label_sandsalt"] != null && row["label_sandsalt"].ToString() != "")
                {
                    model.label_sandsalt = decimal.Parse(row["label_sandsalt"].ToString());
                }
                if (row["label_amine"] != null && row["label_amine"].ToString() != "")
                {
                    model.label_amine = decimal.Parse(row["label_amine"].ToString());
                }
                if (row["label_ffa"] != null && row["label_ffa"].ToString() != "")
                {
                    model.label_ffa = decimal.Parse(row["label_ffa"].ToString());
                }
                if (row["label_fat"] != null && row["label_fat"].ToString() != "")
                {
                    model.label_fat = decimal.Parse(row["label_fat"].ToString());
                }
                if (row["labe_water"] != null && row["labe_water"].ToString() != "")
                {
                    model.labe_water = decimal.Parse(row["labe_water"].ToString());
                }
                if (row["label_sand"] != null && row["label_sand"].ToString() != "")
                {
                    model.label_sand = decimal.Parse(row["label_sand"].ToString());
                }
                if (row["label_lysine"] != null && row["label_lysine"].ToString() != "")
                {
                    model.label_lysine = decimal.Parse(row["label_lysine"].ToString());
                }
                if (row["label_methionine"] != null && row["label_methionine"].ToString() != "")
                {
                    model.label_methionine = decimal.Parse(row["label_methionine"].ToString());
                }
                if (row["domestic_protein"] != null && row["domestic_protein"].ToString() != "")
                {
                    model.domestic_protein = decimal.Parse(row["domestic_protein"].ToString());
                }
                if (row["domestic_tvn"] != null && row["domestic_tvn"].ToString() != "")
                {
                    model.domestic_tvn = decimal.Parse(row["domestic_tvn"].ToString());
                }
                if (row["domestic_graypart"] != null && row["domestic_graypart"].ToString() != "")
                {
                    model.domestic_graypart = decimal.Parse(row["domestic_graypart"].ToString());
                }
                if (row["domestic_sandsalt"] != null && row["domestic_sandsalt"].ToString() != "")
                {
                    model.domestic_sandsalt = decimal.Parse(row["domestic_sandsalt"].ToString());
                }
                if (row["domestic_sour"] != null && row["domestic_sour"].ToString() != "")
                {
                    model.domestic_sour = decimal.Parse(row["domestic_sour"].ToString());
                }
                if (row["domestic_lysine"] != null && row["domestic_lysine"].ToString() != "")
                {
                    model.domestic_lysine = decimal.Parse(row["domestic_lysine"].ToString());
                }
                if (row["domestic_methionine"] != null && row["domestic_methionine"].ToString() != "")
                {
                    model.domestic_methionine = decimal.Parse(row["domestic_methionine"].ToString());
                }

                if (row["supplierid"] != null && row["supplierid"].ToString() != "")
                {
                    model.supplierid = int.Parse(row["supplierid"].ToString());
                }
                if (row["linkmanid"] != null && row["linkmanid"].ToString() != "")
                {
                    model.linkmanid = int.Parse(row["linkmanid"].ToString());
                }
                if (row["linkmancode"] != null)
                {
                    model.linkmancode = row["linkmancode"].ToString();
                }
                if (row["linkman"] != null)
                {
                    model.linkman = row["linkman"].ToString();
                }
                if (row["latestquote"] != null && row["latestquote"].ToString() != "")
                {
                    model.latestquote = decimal.Parse(row["latestquote"].ToString());
                }

                if (row["goodsinfo"] != null)
                {
                    model.goodsinfo = row["goodsinfo"].ToString();
                }
                if (row["shipno"] != null)
                {
                    model.shipno = row["shipno"].ToString();
                }
                if (row["cornerno"] != null)
                {
                    model.cornerno = row["cornerno"].ToString();
                }
                if (row["tariffrate"] != null && row["tariffrate"].ToString() != "")
                {
                    model.tariffrate = decimal.Parse(row["tariffrate"].ToString());
                }
                if (row["samplingtime"] != null)
                {
                    model.samplingtime = row["samplingtime"].ToString();
                }
                if (row["warehouse"] != null)
                {
                    model.warehouse = row["warehouse"].ToString();
                }
                if (row["sgsweight"] != null && row["sgsweight"].ToString() != "")
                {
                    model.sgsweight = decimal.Parse(row["sgsweight"].ToString());
                }
                if (row["sgsquantity"] != null && row["sgsquantity"].ToString() != "")
                {
                    model.sgsquantity = int.Parse(row["sgsquantity"].ToString());
                }
                if (row["domestic_amine"] != null && row["domestic_amine"].ToString() != "")
                {
                    model.domestic_amine = decimal.Parse(row["domestic_amine"].ToString());
                }
                if (row["domestic_aminototal"] != null && row["domestic_aminototal"].ToString() != "")
                {
                    model.domestic_aminototal = decimal.Parse(row["domestic_aminototal"].ToString());
                }
                if (row["domestic_fat"] != null && row["domestic_fat"].ToString() != "")
                {
                    model.domestic_fat = decimal.Parse(row["domestic_fat"].ToString());
                }

                #endregion
                #region ProductEx

                if (row["quotedate"] != null)
                {
                    model.quotedate = row["quotedate"].ToString();
                }
                if (row["quoteweight"] != null && row["quoteweight"].ToString() != "")
                {
                    model.quoteweight = decimal.Parse(row["quoteweight"].ToString());
                }
                if (row["quotequantity"] != null && row["quotequantity"].ToString() != "")
                {
                    model.quotequantity = int.Parse(row["quotequantity"].ToString());
                }
                if (row["quotedollars"] != null && row["quotedollars"].ToString() != "")
                {
                    model.quotedollars = decimal.Parse(row["quotedollars"].ToString());
                }
                if (row["quotermb"] != null && row["quotermb"].ToString() != "")
                {
                    model.quotermb = decimal.Parse(row["quotermb"].ToString());
                }
                if (row["quotesuppliercode"] != null)
                {
                    model.quotesuppliercode = row["quotesuppliercode"].ToString();
                }
                if (row["quotesupplier"] != null)
                {
                    model.quotesupplier = row["quotesupplier"].ToString();
                }
                if (row["quotelinkmancode"] != null)
                {
                    model.quotelinkmancode = row["quotelinkmancode"].ToString();
                }
                if (row["quotelinkman"] != null)
                {
                    model.quotelinkman = row["quotelinkman"].ToString();
                }
                if (row["quoteproductyear"] != null)
                {
                    model.quoteproductyear = row["quoteproductyear"].ToString();
                }
                if (row["quoteproductdate"] != null)
                {
                    model.quoteproductdate = row["quoteproductdate"].ToString();
                }
                if (row["quotelife"] != null)
                {
                    model.quotelife = row["quotelife"].ToString();
                }
                if (row["quotesaildatefast"] != null)
                {
                    model.quotesaildatefast = row["quotesaildatefast"].ToString();
                }
                if (row["quotesaildatelate"] != null)
                {
                    model.quotesaildatelate = row["quotesaildatelate"].ToString();
                }

                #endregion
            }

            return(model);
        }
Пример #7
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     //Add();
     if (e.ColumnIndex < 0 && e.RowIndex < 0)
     {
         this.DialogResult = DialogResult.Cancel;
     }
     _model = new FishEntity.ProductQuoteVo();
     if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) != true)
     {
         if (dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString() != "分组小计")
         {
             _model.code          = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString();
             _model.specification = dataGridView1.Rows[e.RowIndex].Cells["specification"].Value.ToString();
             _model.nature        = dataGridView1.Rows[e.RowIndex].Cells["nature"].Value.ToString();
             _model.brand         = dataGridView1.Rows[e.RowIndex].Cells["brand"].Value.ToString();
             _model.billofgoods   = dataGridView1.Rows[e.RowIndex].Cells["billofgoods"].Value.ToString();
             _model.shipno        = dataGridView1.Rows[e.RowIndex].Cells["shipno"].Value.ToString();
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_protein"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_protein"].Value != null)
             {
                 _model.sgs_protein = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_protein"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_tvn"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_tvn"].Value != null)
             {
                 _model.sgs_tvn = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_tvn"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_fat"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_fat"].Value != null)
             {
                 _model.sgs_fat = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_fat"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_water"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_water"].Value != null)
             {
                 _model.sgs_water = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_water"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_amine"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_amine"].Value != null)
             {
                 _model.sgs_amine = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_amine"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_ffa"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_ffa"].Value != null)
             {
                 _model.sgs_ffa = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_ffa"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_sandsalt"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_sandsalt"].Value != null)
             {
                 _model.sgs_sandsalt = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_sandsalt"].Value.ToString());
             }
             if (dataGridView1.Rows[e.RowIndex].Cells["sgs_graypart"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["sgs_graypart"].Value != null)
             {
                 _model.sgs_graypart = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["sgs_graypart"].Value.ToString());
             }
             _model.supplier        = dataGridView1.Rows[e.RowIndex].Cells["supplier"].Value.ToString();
             _model.Supplieruser    = dataGridView1.Rows[e.RowIndex].Cells["supplieruser"].Value.ToString();
             _model.confirmrmb      = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["confirmrmb"].Value.ToString());
             _model.codeNum         = dataGridView1.Rows[e.RowIndex].Cells["codeNum"].Value.ToString();
             _model.codeNumContract = dataGridView1.Rows[e.RowIndex].Cells["codeNumContract"].Value.ToString();
             this.DialogResult      = DialogResult.OK;
         }
     }
     if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) == true)
     {
         SeeFishDetail(e.ColumnIndex, e.RowIndex);
     }
     else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("isdelete3", StringComparison.OrdinalIgnoreCase) == true)
     {
         boolget = true;
     }
     else
     {
         boolget = false;
     }
 }
Пример #8
0
        private void txtFishid_DoubleClick(object sender, EventArgs e)
        {
            if (rabBP.Checked == false && rabXH.Checked == false && rabZY.Checked == false)
            {
                MessageBox.Show("请选择数据来源");
                return;
            }
            _bll = new FishBll.Bll.PurchaseAppFishInfoBll();
            if (rabBP.Checked == true)
            {
                FormQuote form = new FormQuote( );
                if (form.ShowDialog( ) != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Quote = form.getModel;
                if (Quote == null)
                {
                    return;
                }

                //if ( !Quote . code . Equals ( txtFishid . Text ) )
                //{
                //    MessageBox . Show ( "请选择鱼粉ID是:"+txtFishid.Text+"的内容" );
                //    return;
                //}
                txtFishid.Text         = Quote.code;
                txtspecifications.Text = Quote.specification;
                txtcountry.Text        = Quote.nature;
                txtbrand.Text          = Quote.brand;
                txtbillName.Text       = Quote.billofgoods;
                txtshipName.Text       = Quote.shipno;
                txtconProtein.Text     = Quote.quote_protein.ToString( );
                txtconTVN.Text         = Quote.quote_tvn.ToString( );
                txtconZA.Text          = Quote.quote_amine.ToString( );
                txtconFFA.Text         = Quote.quote_ffa.ToString( );
                txtconSHY.Text         = Quote.quote_sandsalt.ToString( );
                txtconHF.Text          = Quote.quote_graypart.ToString( );
                txtconZF.Text          = Quote.quote_fat.ToString( );
                txtconSF.Text          = Quote.quote_water.ToString( );
                txtconS.Text           = Quote.quote_sand.ToString( );
                txtconSJ.Text          = txtconLAS.Text = txtconDAS.Text = string.Empty;
                QueryFishid();
            }
            else if (rabXH.Checked == true)
            {
                FormSpot form = new FormSpot( );
                if (form.ShowDialog( ) != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Spot = form.getModel;
                if (Spot == null)
                {
                    return;
                }
                //if ( !Spot . code . Equals ( txtFishid . Text ) )
                //{
                //    MessageBox . Show ( "请选择鱼粉ID是:" + txtFishid . Text + "的内容" );
                //    return;
                //}
                txtFishid.Text         = Spot.code;
                txtspecifications.Text = Spot.specification;
                txtcountry.Text        = Spot.nature;
                txtbrand.Text          = Spot.brand;
                txtbillName.Text       = Spot.billofgoods;
                txtshipName.Text       = Spot.shipno;
                txtconProtein.Text     = Spot.sgs_protein.ToString( );
                txtconTVN.Text         = Spot.sgs_tvn.ToString( );
                txtconZA.Text          = Spot.sgs_amine.ToString( );
                txtconFFA.Text         = Spot.sgs_ffa.ToString( );
                txtconSHY.Text         = Spot.sgs_sandsalt.ToString( );
                txtconHF.Text          = Spot.sgs_graypart.ToString( );
                txtconZF.Text          = Spot.sgs_fat.ToString( );
                txtconSF.Text          = Spot.sgs_water.ToString( );
                txtconS.Text           = txtconSJ.Text = txtconLAS.Text = txtconDAS.Text = string.Empty;
                QueryFishid();
            }
            else if (rabZY.Checked == true)
            {
                FormSelfSale form = new FormSelfSale( );
                if (form.ShowDialog( ) != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo SelfSale = form.getModel;
                if (SelfSale == null)
                {
                    return;
                }
                //if ( !SelfSale . code . Equals ( txtFishid . Text ) )
                //{
                //    MessageBox . Show ( "请选择鱼粉ID是:" + txtFishid . Text + "的内容" );
                //    return;
                //}
                txtFishid.Text         = SelfSale.code;
                txtspecifications.Text = SelfSale.specification;
                txtcountry.Text        = SelfSale.nature;
                txtbrand.Text          = SelfSale.brand;
                txtbillName.Text       = SelfSale.billofgoods;
                txtshipName.Text       = SelfSale.shipno;
                txtconProtein.Text     = SelfSale.sgs_protein.ToString( );
                txtconTVN.Text         = SelfSale.sgs_tvn.ToString( );
                txtconZA.Text          = SelfSale.sgs_amine.ToString( );
                txtconFFA.Text         = SelfSale.sgs_ffa.ToString( );
                txtconSHY.Text         = SelfSale.sgs_sandsalt.ToString( );
                txtconHF.Text          = SelfSale.sgs_graypart.ToString( );
                txtconZF.Text          = SelfSale.sgs_fat.ToString( );
                txtconSF.Text          = SelfSale.sgs_water.ToString( );
                txtconS.Text           = txtconSJ.Text = txtconLAS.Text = txtconDAS.Text = string.Empty;
                QueryFishid();
            }
        }
Пример #9
0
        private void dataGridView1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.ColumnIndex < 0 && e.RowIndex < 0)
            {
                if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) == true)
                {
                    return;
                }
            }
            this.DialogResult = DialogResult.Cancel;
            _model            = new FishEntity.ProductQuoteVo();
            if (dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString() != "分组小计")
            {
                _model.code          = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString();
                _model.specification = dataGridView1.Rows[e.RowIndex].Cells["specification"].Value.ToString();
                _model.nature        = dataGridView1.Rows[e.RowIndex].Cells["nature"].Value.ToString();
                _model.brand         = dataGridView1.Rows[e.RowIndex].Cells["brand"].Value.ToString();
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_protein"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_protein"].Value != null)
                {
                    _model.domestic_protein = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_protein"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_tvn"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_tvn"].Value != null)
                {
                    _model.domestic_tvn = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_tvn"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_ffa"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_ffa"].Value != null)
                {
                    _model.domestic_ffa = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_ffa"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_sandsalt"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_sandsalt"].Value != null)
                {
                    _model.domestic_sandsalt = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_sandsalt"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_sour"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_sour"].Value != null)
                {
                    _model.domestic_sour = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_sour"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_amine"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_amine"].Value != null)
                {
                    _model.domestic_amine = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_amine"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_fat"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_fat"].Value != null)
                {
                    _model.domestic_fat = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_fat"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["domestic_graypart"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["domestic_graypart"].Value != null)
                {
                    _model.domestic_graypart = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["domestic_graypart"].Value.ToString());
                }
                if (dataGridView1.Rows[e.RowIndex].Cells["finisheWeight"].Value.ToString() != "" && dataGridView1.Rows[e.RowIndex].Cells["finisheWeight"].Value != null)
                {
                    _model.finisheWeight = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["finisheWeight"].Value.ToString());
                }

                //_model.supplier = dataGridView1.Rows[e.RowIndex].Cells["supplier"].Value.ToString();
                //_model.Supplieruser = dataGridView1.Rows[e.RowIndex].Cells["supplieruser"].Value.ToString();
                //_model.confirmrmb = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["confirmrmb"].Value.ToString());
                _model.codeNum         = dataGridView1.Rows[e.RowIndex].Cells["codeNum"].Value.ToString();
                _model.codeNumContract = dataGridView1.Rows[e.RowIndex].Cells["codeNumContract"].Value.ToString();
                this.DialogResult      = DialogResult.OK;
            }
        }
Пример #10
0
        private void txtfishId_DoubleClick(object sender, EventArgs e)
        {
            if (rabBP.Checked == false && rabXH.Checked == false && rabZY.Checked == false)
            {
                MessageBox.Show("请选择数据来源");
                return;
            }

            if (rabBP.Checked == true)
            {
                FormQuote form = new FormQuote();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Quote = form.getModel;
                if (Quote == null)
                {
                    return;
                }
                txtcountry.Text       = Quote.nature;
                txtsupplier.Text      = Quote.quotesupplier;
                txtsupplierUser.Text  = Quote.linkman;
                danjia.Text           = Quote.quotermb.ToString();
                txtpriceMY.Text       = Quote.quotedollars.ToString();
                txtbrands.Text        = Quote.specification;
                txtfishId.Text        = Quote.code;
                txtEexchangeRate.Text = Quote.QuotEexchangeRate;
            }
            else if (rabXH.Checked == true)
            {
                FormSpot form = new FormSpot();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo Spot = form.getModel;
                if (Spot == null)
                {
                    return;
                }
                txtcountry.Text      = Spot.nature;
                txtsupplier.Text     = Spot.quotesupplier;
                txtsupplierUser.Text = Spot.linkman;
                danjia.Text          = Spot.quotermb.ToString();
                txtbrands.Text       = Spot.specification;
                txtfishId.Text       = Spot.code;
            }
            else if (rabZY.Checked == true)
            {
                FormNewPriWarehouse form = new FormNewPriWarehouse();
                if (form.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                FishEntity.ProductQuoteVo SelfSale = form.getModel;
                if (SelfSale == null)
                {
                    return;
                }
                txtcountry.Text      = SelfSale.nature;
                txtsupplier.Text     = SelfSale.supplier;
                txtsupplierUser.Text = SelfSale.Supplieruser;
                danjia.Text          = SelfSale.confirmrmb.ToString();
                txtbrands.Text       = SelfSale.specification;
                txtfishId.Text       = SelfSale.code;
            }
        }
Пример #11
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            Add();
            if (e.ColumnIndex < 0 && e.RowIndex < 0)
            {
                this.DialogResult = DialogResult.Cancel;
            }
            _model = new FishEntity.ProductQuoteVo();
            if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) != true)
            {
                if (dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString() != "分组小计")
                {
                    _model.code          = dataGridView1.Rows[e.RowIndex].Cells["code"].Value.ToString();
                    _model.specification = dataGridView1.Rows[e.RowIndex].Cells["specification"].Value.ToString();
                    _model.nature        = dataGridView1.Rows[e.RowIndex].Cells["nature"].Value.ToString();
                    _model.brand         = dataGridView1.Rows[e.RowIndex].Cells["brand"].Value.ToString();
                    _model.billofgoods   = dataGridView1.Rows[e.RowIndex].Cells["billofgoods"].Value.ToString();
                    _model.shipno        = dataGridView1.Rows[e.RowIndex].Cells["shipno"].Value.ToString();

                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_protein"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_protein"].Value.ToString() != "")
                    {
                        _model.quote_protein = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_protein"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_tvn"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_tvn"].Value.ToString() != "")
                    {
                        _model.quote_tvn = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_tvn"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_amine"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_amine"].Value.ToString() != "")
                    {
                        _model.quote_amine = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_amine"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_ffa"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_ffa"].Value.ToString() != "")
                    {
                        _model.quote_ffa = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_ffa"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_sandsalt"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_sandsalt"].Value.ToString() != "")
                    {
                        _model.quote_sandsalt = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_sandsalt"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_graypart"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_graypart"].Value.ToString() != "")
                    {
                        _model.quote_graypart = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_graypart"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_fat"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_fat"].Value.ToString() != "")
                    {
                        _model.quote_fat = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_fat"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_water"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_water"].Value.ToString() != "")
                    {
                        _model.quote_water = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_water"].Value.ToString());
                    }
                    if (dataGridView1.Rows[e.RowIndex].Cells["quote_sand"].Value != null && dataGridView1.Rows[e.RowIndex].Cells["quote_sand"].Value.ToString() != "")
                    {
                        _model.quote_sand = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quote_sand"].Value.ToString());
                    }
                    _model.QuotEexchangeRate = dataGridView1.Rows[e.RowIndex].Cells["quotEexchangeRate"].Value.ToString();
                    _model.quotesupplier     = dataGridView1.Rows[e.RowIndex].Cells["quotesupplier"].Value.ToString();
                    _model.quotesuppliercode = dataGridView1.Rows[e.RowIndex].Cells["quotesuppliercode"].Value.ToString();
                    _model.linkman           = dataGridView1.Rows[e.RowIndex].Cells["linkman"].Value.ToString();
                    _model.quotelinkmancode  = dataGridView1.Rows[e.RowIndex].Cells["quotelinkmancode"].Value.ToString();
                    _model.quotermb          = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quotermb"].Value.ToString());
                    _model.quotedollars      = decimal.Parse(dataGridView1.Rows[e.RowIndex].Cells["quotedollars"].Value.ToString());
                    this.DialogResult        = DialogResult.OK;
                }
            }
            if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("code", StringComparison.OrdinalIgnoreCase) == true)
            {
                SeeFishDetail(e.ColumnIndex, e.RowIndex);
            }
            else if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("isdelete", StringComparison.OrdinalIgnoreCase) == true)
            {
                boolget = true;
            }
            else
            {
                boolget = false;
            } if (dataGridView1.Columns[e.ColumnIndex].Name.Equals("Display", StringComparison.OrdinalIgnoreCase) == true)
            {
                Display11 = true;
            }
            else
            {
                Display11 = false;
            }
        }