Exemplo n.º 1
0
        public bool InsertRequsitionItemData(string userID, RequisitionItemData data)
        {
            Boolean ret = true;
            RequisitionItemDAL oDAL = new RequisitionItemDAL();

            oDAL.REQUISITION = Convert.ToDouble(data.REQUISITION);
            oDAL.PRODUCT = Convert.ToDouble(data.PRODUCT);
            oDAL.UNIT = Convert.ToDouble(data.UNIT);
            oDAL.PRICE = Convert.ToDouble(data.PRICE);
            oDAL.QTY = Convert.ToDouble(data.QTY);
            oDAL.NETPRICE = Convert.ToDouble(data.NETPRICE);
            oDAL.DISCOUNT = Convert.ToDouble(data.DISCOUNT);
            oDAL.ACTIVE = data.ACTIVE.ToString();
           
            ret = oDAL.InsertCurrentData(userID, null);
            if (ret == false)
                _error = oDAL.ErrorMessage;

            return ret;
        }
Exemplo n.º 2
0
        public double UpdateRequsitionItemData(string UserID, RequisitionItemData data)
        {
            Boolean ret = true;
            RequisitionItemDAL oDAL = new RequisitionItemDAL();
            oDAL.GetDataByLOID(data.LOID, null);
            oDAL.QTY = Convert.ToDouble(data.QTY);
            oDAL.NETPRICE = Convert.ToDouble(data.NETPRICE);
            oDAL.DISCOUNT = Convert.ToDouble(data.DISCOUNT);

            ret = oDAL.UpdateCurrentData(UserID, null);

            if (ret == false)
            {
                _error = oDAL.ErrorMessage;
                return 0;
            }
            else
                return oDAL.LOID;
        }