예제 #1
0
 private StockCheckData GetData()
 {
     StockCheckData data = new StockCheckData();
     data.BATCHNO = this.txtBatchNo.Text;
     data.CHECKDATE = this.ctlCheckDate.DateValue;
     data.WAREHOUSE = Convert.ToDouble(this.cmbWarehouseName.SelectedItem.Value);
     return data;
 }
예제 #2
0
 public StockCheckData GetData(double _LOID)
 {
     StockCheckData data = new StockCheckData();
     StockCheckDAL sDAL = new StockCheckDAL();
     sDAL.GetDataByLOID(_LOID, null);
     data.BATCHNO = sDAL.BATCHNO;
     data.CHECKDATE = sDAL.CHECKDATE;
     data.WAREHOUSE = sDAL.WAREHOUSE;
     return data;
 }
예제 #3
0
        public bool InsertNewBatchNo(string userID, StockCheckData data)
        {
            bool ret = true;
            StockCheckDAL itemDAL = new StockCheckDAL();
            OracleDBObj obj = new OracleDBObj();
            obj.CreateTransaction();
            try
            {
                itemDAL.BATCHNO = GenNewBatchNo(data.WAREHOUSE, obj.zTrans);
                itemDAL.CHECKDATE = DateTime.Now;
                itemDAL.WAREHOUSE = data.WAREHOUSE;
                itemDAL.STATUS = Constz.Requisition.Status.Waiting.Code;

                ret = itemDAL.InsertCurrentData(userID, obj.zTrans);
                if (!ret) throw new ApplicationException(itemDAL.ErrorMessage);
                _LOID = itemDAL.LOID;

                obj.zTrans.Commit();
                obj.CloseConnection();
            }
            catch (Exception ex)
            {
                ret = false;
                obj.zTrans.Rollback();
                obj.CloseConnection();
            }
            return ret;
        }