Exemplo n.º 1
0
 /// <summary>
 /// 设置对象实例
 /// </summary>
 /// <param name="OLid">ID</param>
 /// <param name="OLCKid">仓库ID</param>
 /// <param name="OLGSid">物品ID</param>
 /// <param name="OLnum">出库单号</param>
 /// <param name="OLquantity">数量</param>
 /// <param name="OLDW">单位</param>
 /// <param name="OLDJ">单价</param>
 /// <param name="OLYSHK">应收货款</param>
 /// <param name="OLSSHK">实收货款</param>
 /// <param name="OLKHid">购货商ID</param>
 /// <param name="OLZDMGid">制单人</param>
 /// <param name="OLYHMGid">验货人</param>
 /// <param name="OLSHY">收货人</param>
 /// <param name="OLPrice">金额</param>
 /// <param name="OLDate">出单日期</param>
 /// <param name="OLSHMGid">送货人</param>
 /// <param name="OLstatus">出库单状态</param>
 /// <param name="OLnote">备注</param>
 /// <returns>DAO.Outoflibrary</returns>
 public DAO.Outoflibrary SetModel(string OLid, string OLCKid, string OLGSid, string OLnum,
     int OLquantity, string OLDW, decimal OLDJ, decimal OLYSHK, decimal OLSSHK,string OLKHid,
     string OLZDMGid, string OLYHMGid, string OLSHY, decimal OLPrice, DateTime OLDate,
     string OLSHMGid, string OLstatus, string OLnote)
 {
     DAO.Outoflibrary myModel = new DAO.Outoflibrary();
     myModel.OLid = OLid;
     myModel.OLckid = OLCKid;
     myModel.OLgsid = OLGSid;
     myModel.OLnum = OLnum;
     myModel.OLquantity = OLquantity;
     myModel.OLDW = OLDW;
     myModel.OLDJ = OLDJ;
     myModel.OLYSHK = OLYSHK;
     myModel.OLSSHK = OLSSHK;
     myModel.OLKHID = OLKHid;
     myModel.OLZDMGid = OLZDMGid;
     myModel.OLYHMGid = OLYHMGid;
     myModel.OLSHY = OLSHY;
     myModel.OLprice = OLPrice;
     myModel.OLdate = OLDate;
     myModel.OLSHMGid = OLSHMGid;
     myModel.OLstatus = OLstatus;
     myModel.OLnote = OLnote;
     return myModel;
 }
Exemplo n.º 2
0
 /// <summary>
 /// 获取对象实例
 /// </summary>
 /// <param name="OLid">ID</param>
 /// <returns>DAO.Outoflibrary</returns>
 public DAO.Outoflibrary GetModel(string OLid)
 {
     StringBuilder Strsql = new StringBuilder();
     Strsql.Append("select * from db_outoflibrary where ol_id=" + OLid);
     DataSet myDS=DBHelperSQL.Query(Strsql.ToString());
     DAO.Outoflibrary myModel = new DAO.Outoflibrary();
     myModel.OLid = OLid;
     myModel.OLckid = myDS.Tables[0].Rows[0]["ol_ckid"].ToString();
     myModel.OLgsid = myDS.Tables[0].Rows[0]["ol_gsid"].ToString();
     myModel.OLnum = myDS.Tables[0].Rows[0]["ol_num"].ToString();
     myModel.OLquantity = int.Parse(myDS.Tables[0].Rows[0]["ol_quantity"].ToString());
     myModel.OLDW = myDS.Tables[0].Rows[0]["ol_dw"].ToString();
     myModel.OLDJ = decimal.Parse(myDS.Tables[0].Rows[0]["ol_dj"].ToString());
     myModel.OLYSHK = decimal.Parse(myDS.Tables[0].Rows[0]["ol_yshk"].ToString());
     myModel.OLSSHK = decimal.Parse(myDS.Tables[0].Rows[0]["ol_sshk"].ToString());
     myModel.OLKHID = myDS.Tables[0].Rows[0]["ol_khid"].ToString();
     myModel.OLZDMGid = myDS.Tables[0].Rows[0]["ol_zd_mgid"].ToString();
     myModel.OLYHMGid = myDS.Tables[0].Rows[0]["ol_yh_mgid"].ToString();
     myModel.OLSHY = myDS.Tables[0].Rows[0]["ol_shy"].ToString();
     myModel.OLprice = decimal.Parse(myDS.Tables[0].Rows[0]["ol_price"].ToString());
     myModel.OLdate = DateTime.Parse(myDS.Tables[0].Rows[0]["ol_date"].ToString());
     myModel.OLSHMGid = myDS.Tables[0].Rows[0]["ol_sh_mgid"].ToString();
     myModel.OLstatus = myDS.Tables[0].Rows[0]["ol_status"].ToString();
     myModel.OLnote = myDS.Tables[0].Rows[0]["ol_note"].ToString();
     return myModel;
 }