コード例 #1
0
 public FishEntity.PurchaseOtherInfo getOtherInfo(DataRow row)
 {
     FishEntity.PurchaseOtherInfo model = new FishEntity.PurchaseOtherInfo( );
     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 ["brands"] != null)
         {
             model.brand = row ["brands"].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( ));
         }
     }
     return(model);
 }
コード例 #2
0
 private void FormPurchaseApplication_Load(object sender, EventArgs e)
 {
     this.tmiPrevious.Visible = false;
     this.tmiNext.Visible     = false;
     if (Megres.oddNum != "")
     {
         _model     = new FishEntity.PurchaseApplicationEntity();
         _bll       = new FishBll.Bll.PurchaseApplicationBll();
         _fishInfo  = new FishEntity.PurchaseFishInfo();
         _otherInfo = new FishEntity.PurchaseOtherInfo();
         strWhere   = " codeNum='" + Megres.oddNum + "'";
         _model     = _bll.getModel(strWhere);
         if (_model == null)
         {
             MessageBox.Show("请重新查询");
             this.panel1.Enabled = false;
             return;
         }
         setValue();
         //if (string.IsNullOrEmpty(_model.codeNum))
         //    return ;
         //List<FishEntity.PurchaseFishInfo> listFishInfo = _bll.getFishInfoList(_model.codeNum);
         //if (listFishInfo != null && listFishInfo.Count > 0)
         //    setValueFishInfo(listFishInfo);
         this.panel1.Enabled = true;
     }
     else
     {
         strWhere = string.Empty;
     }
     //权限控制功能。
     Megres.oddNum = string.Empty;
 }