Exemplo n.º 1
0
        /// <summary>
        /// ** 功能描述:	将materialStockIns中的序列号关联至入库单
        /// ** 作 者:		Jane Shu
        /// ** 日 期:		2005-07-29
        /// ** 修 改:
        /// ** 日 期:
        /// </summary>
        /// <param name="ticketNo">入库单号</param>
        /// <param name="materialStockIns">入库单的序列号数组</param>
        public void AddMaterialStockIn(string ticketNo, System.Data.DataTable materialStockIns, string user, string memo)
        {
            bool alreadyMemo = false;

            foreach (System.Data.DataRow dr in materialStockIns.Rows)
            {
                MaterialStockIn stockIn = new MaterialStockIn();
                //karron qiu ,2005/09/16 ,增加OID主键
                stockIn.OID = Guid.NewGuid().ToString();
                //-----------------------------------

                stockIn.TicketNO     = ticketNo;
                stockIn.Status       = StockStatus.Initial;
                stockIn.CollectType  = dr["CollectType"].ToString().ToUpper();
                stockIn.MaintainUser = user;
                //2006/11/17,Laws Lu add get DateTime from db Server
                DBDateTime dbDateTime = FormatHelper.GetNowDBDateTime(DataProvider);

                DateTime dtNow = FormatHelper.ToDateTime(dbDateTime.DBDate, dbDateTime.DBTime);

                stockIn.MaintainDate = FormatHelper.TODateInt(dtNow);
                stockIn.MaintainTime = FormatHelper.TOTimeInt(dtNow);

                stockIn.RunningCard = dr["产品序列号"].ToString().ToUpper().Trim();
                stockIn.MOCode      = dr["工单"].ToString().ToUpper().Trim();
                stockIn.ModelCode   = dr["机种"].ToString().ToUpper().Trim();

                if (alreadyMemo == false)
                {
                    stockIn.StockMemo = memo;
                    alreadyMemo       = true;
                }

                this.DataProvider.Insert(stockIn);
            }
        }
Exemplo n.º 2
0
 //Laws Lu,2005/09/05,更新入库信息
 public void UpdateMaterialStockIn(MaterialStockIn materialStockIn)
 {
     this._helper.UpdateDomainObject(materialStockIn);
 }