Exemple #1
0
        public bool UpdateData(string userID, ControlStockData data)
        {
            bool ret = true;

            ProductMinMaxDAL oDAL = new ProductMinMaxDAL();

                oDAL.GetDataByLOID(data.LOID, null);
 
                oDAL.STANDARD = Convert.ToDouble(data.STANDARD);
                oDAL.MINIMUM = Convert.ToDouble(data.MINIMUM);
                oDAL.MAXIMUM = Convert.ToDouble(data.MAXIMUM);

                ret = oDAL.UpdateCurrentData(userID, null);

                if (!ret)
                {
                    _error = oDAL.ErrorMessage;
                }
         
            return ret;
        }
Exemple #2
0
        public bool InsertData(string userID, ControlStockData data)
        {
            Boolean ret = true;
            ProductMinMaxDAL oDAL = new ProductMinMaxDAL();

            oDAL.PRODUCT = Convert.ToInt32(data.PRODUCT);
            oDAL.WAREHOUSE = Convert.ToInt32(data.WAREHOUSE);
            oDAL.STANDARD = Convert.ToDouble(data.STANDARD);
            oDAL.MINIMUM = Convert.ToDouble(data.MINIMUM);
            oDAL.MAXIMUM = Convert.ToDouble(data.MAXIMUM);
            oDAL.ACTIVE = Convert.ToInt32(data.ACTIVE);

            ret = oDAL.InsertCurrentData(userID, null);

            if (ret == false)
                _error = oDAL.ErrorMessage;
            else
                _LOID = oDAL.LOID;

            return ret;

        }
Exemple #3
0
        public bool DeleteData(string userID, ControlStockData data)
        {
            bool ret = true;
            ProductMinMaxDAL oDAL = new ProductMinMaxDAL();

            oDAL.LOID = Convert.ToDouble(data.LOID);

            ret = oDAL.DeleteCurrentData(null);

            if (ret == false)
                _error = oDAL.ErrorMessage;

            return ret;

        }
        public bool DeleteData(ArrayList arrLOID)
        {
            bool ret = true;
            OracleDBObj objDB = new OracleDBObj();

            objDB.CreateConnection();
            objDB.CreateTransaction();

            try
            {
                foreach (double LOID in arrLOID)
                {
                    ProductMinMaxDAL oDAL = new ProductMinMaxDAL();
                    oDAL.GetDataByLOID(LOID, objDB.zTrans);
                    oDAL.DeleteCurrentData(objDB.zTrans);
                }
                objDB.zTrans.Commit();
                ret = true;
            }
            catch (Exception ex)
            {
                objDB.zTrans.Rollback();
                _error = ex.Message;
                ret = false;
            }

            objDB.CloseConnection();
            return ret;
        }
Exemple #5
0
        public bool UpdateData(string UserID, ControlStockData csData)
        {
            bool ret = true;
            ProductMinMaxDAL oDAL = new ProductMinMaxDAL();

            oDAL.GetDataByLOID(csData.LOID, null);
            oDAL.STANDARD = csData.STANDARD;
            oDAL.MINIMUM = csData.MINIMUM;
            oDAL.MAXIMUM = csData.MAXIMUM;
            oDAL.ACTIVE = 1;

            ret = oDAL.UpdateCurrentData(UserID, null);

            if (ret == false)
                _error = oDAL.ErrorMessage;

            return ret;
        }
Exemple #6
0
        public bool InsertData(string UserID, ControlStockData csData)
        {
            bool ret = true;
            ProductMinMaxDAL oDAL = new ProductMinMaxDAL();

            oDAL.PRODUCT = Convert.ToInt32(csData.PRODUCT);
            oDAL.WAREHOUSE = Convert.ToInt32(csData.WAREHOUSE);
            oDAL.STANDARD = csData.STANDARD;
            oDAL.MINIMUM = csData.MINIMUM;
            oDAL.MAXIMUM = csData.MAXIMUM;
            oDAL.ACTIVE = 1;

            ret = oDAL.InsertCurrentData(UserID, null);

            if (ret == false)
                _error = oDAL.ErrorMessage;

            return ret;
        }