Ejemplo n.º 1
0
        public HttpResponseMessage InsertMenuMaster([FromBody] clsMenuMaster request)
        {
            LoggerFactory.LoggerInstance.LogDebug("Request Started for : " + request.Menuid + "  Menu Name :" + request.MenuName);
            HttpResponseMessage response = new HttpResponseMessage();

            try
            {
                MenuMasterService objComService = new MenuMasterService();
                var objResponse = objComService.InsertMenuMaster(request);
                if (objResponse != null && objResponse.ToString() != "")
                {
                    response = Request.CreateResponse(HttpStatusCode.OK, objResponse);
                    LoggerFactory.LoggerInstance.LogDebug("Request End for : " + request.Menuid + "  Menu Name :" + request.MenuName);
                }
                else
                {
                    response = Request.CreateErrorResponse(HttpStatusCode.NotFound, "No detail found  for  Menu Name : " + request.MenuName + ".");
                }
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Error occured while getting  Menu Name " + request.MenuName + ".");
            }
            return(response);
        }
Ejemplo n.º 2
0
        public virtual SP_MenuMaster_SelectOneResult GetMenuMasterDetailById(clsMenuMaster obj)
        {
            SP_MenuMaster_SelectOneResult objResult = new SP_MenuMaster_SelectOneResult();

            try
            {
                objResult = (SP_MenuMaster_SelectOneResult)db.SP_MenuMaster_SelectOne(obj.Menuid);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }
            return(objResult);
        }
Ejemplo n.º 3
0
        public virtual int DeleteMenuMaster(clsMenuMaster obj)
        {
            int result = 0;

            try
            {
                result = (int)db.SP_MenuMaster_Delete(obj.Menuid);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }

            return(result);
        }
Ejemplo n.º 4
0
        public virtual int UpdateMenuMaster(clsMenuMaster obj)
        {
            int result = 0;

            try
            {
                result = (int)db.SP_MenuMaster_Update(obj.Menuid, obj.MenuName, obj.MenuDesc, obj.Status);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }

            return(result);
        }
Ejemplo n.º 5
0
        public virtual long InsertMenuMaster(clsMenuMaster obj)
        {
            long result   = 0;
            long?resultID = 0;

            try
            {
                result = (long)db.SP_MenuMaster_Insert(obj.MenuName, obj.MenuDesc, obj.Status, ref resultID);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }

            return(result);
        }
Ejemplo n.º 6
0
        public virtual List <SP_MenuMaster_SelectAllResult> GetMenuMasterDetail(clsMenuMaster obj)
        {
            ISingleResult <SP_MenuMaster_SelectAllResult> objResult;
            List <SP_MenuMaster_SelectAllResult>          objResultList;

            try
            {
                objResult     = db.SP_MenuMaster_SelectAll();
                objResultList = new List <SP_MenuMaster_SelectAllResult>(objResult);
            }
            catch (Exception ex)
            {
                LoggerFactory.LoggerInstance.LogException(ex);
                throw ex;
            }
            return(objResultList);
        }