Ejemplo n.º 1
0
        public JsonResult <Models.SBP_LoginInfoWithRoleId> GetUser(int id)
        {
            EntityMapperUsersProfile <DataAccessLayer.sp_GetUserById_Result, Models.SBP_LoginInfoWithRoleId> mapObj = new EntityMapperUsersProfile <DataAccessLayer.sp_GetUserById_Result, Models.SBP_LoginInfoWithRoleId>();

            DataAccessLayer.sp_GetUserById_Result dalBranches = DAL.GetUser(id);
            Models.SBP_LoginInfoWithRoleId        products    = new Models.SBP_LoginInfoWithRoleId();
            products = mapObj.Translate(dalBranches);
            return(Json <Models.SBP_LoginInfoWithRoleId>(products));
        }
Ejemplo n.º 2
0
        public bool UpdateUser(Models.SBP_LoginInfoWithRoleId item)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperUsersProfile <Models.SBP_LoginInfoWithRoleId, DataAccessLayer.sp_GetUserById_Result> mapObj = new EntityMapperUsersProfile <Models.SBP_LoginInfoWithRoleId, DataAccessLayer.sp_GetUserById_Result>();
                DataAccessLayer.sp_GetUserById_Result UsersObj = new DataAccessLayer.sp_GetUserById_Result();
                UsersObj = mapObj.Translate(item);
                status   = DAL.UpdateUser(UsersObj);
            }
            return(status);
        }
Ejemplo n.º 3
0
        public bool InsertUser(Models.SBP_LoginInfoWithRoleId item)
        {
            bool status = false;

            if (ModelState.IsValid)
            {
                EntityMapperUsersProfile <Models.SBP_LoginInfoWithRoleId, DataAccessLayer.sp_GetUserById_Result> mapObj = new EntityMapperUsersProfile <Models.SBP_LoginInfoWithRoleId, DataAccessLayer.sp_GetUserById_Result>();
                DataAccessLayer.sp_GetUserById_Result UsersObj = new DataAccessLayer.sp_GetUserById_Result();
                UsersObj = mapObj.Translate(item);
                status   = DAL.InsertUser(UsersObj);
                //status = DAL.InsertUser(item.UserName,item.Password,item.ContactNo,item.Email,item.BranchId,item.isActive,item.CreateDate,item.URID);
            }
            return(status);
        }