예제 #1
0
        public ActionResult UpdateSec_Role_Organizationunit(int id1, int id2)
        {
            var db = new Sec_Role_OrganizationunitDAL();
            Sec_Role_Organizationunit secrolemenu = new Sec_Role_Organizationunit();

            secrolemenu.RoleID             = id1;
            secrolemenu.OrganizationunitID = id2;
            var result = db.UpdateSec_Role_Organizationunit(1, 1, secrolemenu);

            return(Content(JsonConvert.SerializeObject(new
            {
                result
            })));
        }
예제 #2
0
        public SystemMessage UpdateSec_Role_Organizationunit(int roleId, int idTable, Sec_Role_Organizationunit secrolemenu)
        {
            SystemMessage systemMessage = new SystemMessage();

            try
            {
                var param1 = new DynamicParameters();
                param1.Add("@RoleID ", secrolemenu.RoleID);
                param1.Add("@OrganizationunitID ", secrolemenu.OrganizationunitID);
                UnitOfWork.ProcedureExecute("UpdateSec_Role_Organizationunit", param1);
                systemMessage.IsSuccess = true;
                systemMessage.Message   = "Thêm mới thành công";
                return(systemMessage);
            }
            catch (Exception e)
            {
                systemMessage.IsSuccess = false;
                systemMessage.Message   = e.ToString();
                return(systemMessage);
            }
        }