Example #1
0
        public bool UpdateEnableByID(string shelfid, bool enable)
        {
            bool isSuccsess = true;

            try
            {
                using (DBConnection_EF con = DBConnection_EF.GetUContext())
                {
                    ShelfDef shelf = shelfdefDao.LoadShelfByID(con, shelfid);
                    shelf.Enable = enable == true ? "Y" : "N";
                    shelfdefDao.UpdateShelfDef(con);
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Exception");
                isSuccsess = false;
            }
            return(isSuccsess);
        }