public FishEntity.SalesRequisitionBodyEntity getModel(DataRow row) { FishEntity.SalesRequisitionBodyEntity _model = new FishEntity.SalesRequisitionBodyEntity(); if (row != null) { if (row["NumberingOne"] != null) { _model.NumberingOne = row["NumberingOne"].ToString(); } if (row["code"] != null) { _model.code = row["code"].ToString(); } if (row["product_id"] != null) { _model.product_id = row["product_id"].ToString(); } if (row["productname"] != null) { _model.productname = row["productname"].ToString(); } if (row["Funit"] != null) { _model.Funit = row["Funit"].ToString(); } if (row["Variety"] != null) { _model.Variety = row["Variety"].ToString(); } if (row["Quantity"] != null) { _model.Quantity = decimal.Parse(row["Quantity"].ToString()); } if (row["Amonut"] != null && row["Amonut"].ToString() != "") { _model.Amonut = decimal.Parse(row["Amonut"].ToString()); } if (row["unitprice"] != null) { _model.unitprice = decimal.Parse(row["unitprice"].ToString()); } if (row["db"] != null) { _model.db = row["db"].ToString(); } if (row["tvn"] != null) { _model.tvn = row["tvn"].ToString(); } if (row["za"] != null) { _model.za = row["za"].ToString(); } if (row["ffa"] != null) { _model.ffa = row["ffa"].ToString(); } if (row["zf"] != null) { _model.zf = row["zf"].ToString(); } if (row["sf"] != null) { _model.sf = row["sf"].ToString(); } if (row["shy"] != null) { _model.shy = row["shy"].ToString(); } if (row["sz"] != null) { _model.sz = row["sz"].ToString(); } if (row["cdb"] != null) { _model.cdb = row["cdb"].ToString(); } if (row["tvnOne"] != null) { _model.tvnOne = row["tvnOne"].ToString(); } if (row["hf"] != null) { _model.hf = row["hf"].ToString(); } if (row["cm"] != null) { _model.cm = row["cm"].ToString(); } if (row["tdh"] != null) { _model.tdh = row["tdh"].ToString(); } if (row["zjh"] != null) { _model.zjh = row["zjh"].ToString(); } if (row["pp"] != null) { _model.pp = row["pp"].ToString(); } if (row["Country"] != null) { _model.Country = row["Country"].ToString(); } if (row["zaOne"] != null) { _model.ZaOne = row["zaOne"].ToString(); } if (row["ffaOne"] != null) { _model.FfaOne = row["ffaOne"].ToString(); } if (row["zfOne"] != null) { _model.ZfOne = row["zfOne"].ToString(); } if (row["sfOne"] != null) { _model.SfOne = row["sfOne"].ToString(); } if (row["shyOne"] != null) { _model.ShyOne = row["shyOne"].ToString(); } if (row["szOne"] != null) { _model.SzOne = row["szOne"].ToString(); } } return(_model); }
public void setSaleValue(FishEntity.SalesRequisitionBodyEntity _model, bool state, FishEntity.SalesRequisitionEntity setbool) { label.Text = string.Empty; txtSignplace.Text = texProcudts.Text = _model.Funit; if (_model.db.ToString() != "" && _model.db.ToString() != null && setbool.Dbbool == true) { label.Text += "蛋白≥" + _model.db.ToString() + ","; } if (_model.tvn.ToString() != "" && _model.tvn.ToString() != null && setbool.Tvnbool == true) { label.Text += "TVN≤" + _model.tvn.ToString() + ","; } if (_model.za.ToString() != "" && _model.za.ToString() != null && setbool.Zabool == true) { label.Text += "组胺≤" + _model.za.ToString() + ","; } if (_model.ffa.ToString() != "" && _model.ffa.ToString() != null && setbool.Ffabool == true) { label.Text += "FFA≤" + _model.ffa.ToString() + ","; } if (_model.zf.ToString() != "" && _model.zf.ToString() != null && setbool.Zfbool == true) { label.Text += "脂肪≤" + _model.zf.ToString() + ","; } if (_model.sf.ToString() != "" && _model.sf.ToString() != null && setbool.Sfbool == true) { label.Text += "水分≤" + _model.sf.ToString() + ","; } if (_model.shy.ToString() != "" && _model.shy.ToString() != null && setbool.Shybool == true) { label.Text += "沙和盐≤" + _model.shy.ToString() + ","; } if (_model.sz.ToString() != "" && _model.sz.ToString() != null && setbool.Szbool == true) { label.Text += "沙子≤" + _model.sz.ToString() + ","; } label.Text += "国外SGS,不得发霉、有异味或掺杂其他杂物,且应符合国家质量标准。"; //texZA . Text = _model . za . ToString ( ); //texFFA . Text = _model . ffa . ToString ( ); //texZF . Text = _model . zf . ToString ( ); //texSF . Text = _model . sf . ToString ( ); //texSHY . Text = _model . shy . ToString ( ); //texS . Text = _model . sz . ToString ( ); if (state == true) { texProduct.Text = _model.Funit; label1.Text = string.Empty; if (_model.cdb.ToString() != "" && _model.cdb.ToString() != null && setbool.Cdbbool == true) { label1.Text += "粗蛋白≥" + _model.cdb.ToString() + ","; } if (_model.tvnOne.ToString() != "" && _model.tvnOne.ToString() != null && setbool.Tvnbool == true) { label1.Text += "TVN≤" + _model.tvnOne.ToString() + ","; } if (_model.hf.ToString() != "" && _model.hf.ToString() != null && setbool.Hfbool == true) { label1.Text += "灰份≤" + _model.hf.ToString() + ","; } if (setbool.ZaOnebool == true && _model.ZaOne.ToString() != "" && _model.ZaOne != null) { label1.Text += "组胺≤" + _model.ZaOne.ToString() + ","; } if (setbool.FfaOnebool == true && _model.FfaOne.ToString() != "" && _model.FfaOne != null) { label1.Text += "FFA≤" + _model.FfaOne.ToString() + ","; } if (setbool.ZfOnebool == true && _model.ZfOne.ToString() != "" && _model.ZfOne != null) { label1.Text += "脂肪≤" + _model.ZfOne.ToString() + ","; } if (setbool.SfOnebool == true && _model.SfOne.ToString() != "" && _model.SfOne != null) { label1.Text += "水分≤" + _model.SfOne.ToString() + ","; } if (setbool.ShyOnebool == true && _model.ShyOne.ToString() != "" && _model.ShyOne != null) { label1.Text += "沙和盐≤" + _model.ShyOne.ToString() + ","; } if (setbool.SzOnebool == true && _model.SzOne.ToString() != "" && _model.SzOne != null) { label1.Text += "沙子≤" + _model.SzOne.ToString() + ","; } if (label1.Text != "") { label1.Text += "国内检测指标平均值。"; } } else { texProduct.Text = string.Empty; //texCDB . Text = string . Empty; //textTVN . Text = string . Empty; //texHF . Text = string . Empty; } texCM.Text = _model.cm.ToString(); if (_model.tdh == null) { texTDH.Text = string.Empty; } else { texTDH.Text = _model.tdh.ToString(); } if (_model.zjh.ToString() != "" && _model.zjh.ToString() != null) { texZJH.Text = _model.zjh.ToString(); } texPP.Text = _model.pp; texCountry.Text = _model.Country; if (setbool.Informationbool == true) { if (texCM.Text != "" && texCM.Text != null) { label18.Visible = true; texCM.Visible = true; } if (texTDH.Text != "" && texTDH.Text != null) { label19.Visible = true; texTDH.Visible = true; } if (texZJH.Text != "" && texZJH.Text != null) { label20.Visible = true; texZJH.Visible = true; } if (texCountry.Text != "" && texCountry.Text != null) { label22.Visible = true; texCountry.Visible = true; } if (texPP.Text != "" && texPP.Text != null) { label21.Visible = true; texPP.Visible = true; } } else { label18.Visible = false; texCM.Visible = false; label19.Visible = false; texTDH.Visible = false; label20.Visible = false; texZJH.Visible = false; label22.Visible = false; texCountry.Visible = false; label21.Visible = false; texPP.Visible = false; } }