當前位置: 首頁>>代碼示例>>C#>>正文


C# HandleResult.ResultInfo類代碼示例

本文整理匯總了C#中ProcCore.HandleResult.ResultInfo的典型用法代碼示例。如果您正苦於以下問題:C# ResultInfo類的具體用法?C# ResultInfo怎麽用?C# ResultInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ResultInfo類屬於ProcCore.HandleResult命名空間,在下文中一共展示了ResultInfo類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: aj_MasterUpdate

        //[ValidateInput(false)]
        public string aj_MasterUpdate(parm md)
        {

            ResultInfo rAjaxResult = new ResultInfo();
            try
            {
                var open = openLogic();
                using (db0 = getDB0())
                {

                    if (System.Globalization.CultureInfo.CurrentCulture.Name == "zh-CN")
                    {
                        open.setParmValue(ParmDefine.receiveMails_cn, md.receiveMails);
                    }
                    else
                    {
                        open.setParmValue(ParmDefine.receiveMails, md.receiveMails);
                    }

                }
                rAjaxResult.result = true;
            }
            catch (Exception ex)
            {
                rAjaxResult.result = false;
                rAjaxResult.message = ex.Message;
            }
            return defJSON(rAjaxResult);
        }
開發者ID:jcincloud,項目名稱:C411503_FLStudy,代碼行數:30,代碼來源:ChangeParmController.cs

示例2: axFDelete

 public string axFDelete(int id, string filekind, string filename)
 {
     ResultInfo r = new ResultInfo();
     DeleteSysFile(id, filekind, filename, ImageFileUpParm.NewsBasicSingle, "News", "News");
     r.result = true;
     return defJSON(r);
 }
開發者ID:jcincloud,項目名稱:C421504_Olec,代碼行數:7,代碼來源:ProductController.cs

示例3: aj_FDelete

 public string aj_FDelete(string id, string filekind, string filename)
 {
     ResultInfo r = new ResultInfo();
     DeleteSysFile(id, filekind, filename, ImageFileUpParm.NewsBasicSingle, "Active", "AboutUsData");
     r.result = true;
     return defJSON(r);
 }
開發者ID:jcingroup,項目名稱:C491601_Alder,代碼行數:7,代碼來源:AboutUsDataController.cs

示例4: aj_MasterInsert

 public async Task<string> aj_MasterInsert(AspNetRoles md)
 {
     ResultInfo rAjaxResult = new ResultInfo();
     try
     {
         if (!await roleManager.RoleExistsAsync(md.Name))
         {
             var result = await roleManager.CreateAsync(new IdentityRole(md.Name));
             if (result.Succeeded)
             {
                 var item = await roleManager.FindByNameAsync(md.Name);
                 rAjaxResult.result = true;
                 rAjaxResult.aspnetid = item.Id;
             }
             else
             {
                 rAjaxResult.result = false;
                 rAjaxResult.message = String.Join(":", result.Errors.ToArray());
             }
         }
         else
         {
             rAjaxResult.result = false;
             rAjaxResult.message = "the role " + md.Name + " has exist!";
         }
     }
     catch (Exception ex)
     {
         rAjaxResult.result = false;
         rAjaxResult.message = ex.Message;
     }
     return defJSON(rAjaxResult);
 }
開發者ID:jcincloud,項目名稱:C411503_FLStudy,代碼行數:33,代碼來源:RolesController.cs

示例5: axFDelete

 public string axFDelete(int id, string filekind, string filename)
 {
     ResultInfo r = new ResultInfo();
     DeleteSysFile(id, filekind, filename, ImageFileUpParm.ProductIndex, "NewsData", "Photo");
     r.result = true;
     return defJSON(r);
 }
開發者ID:jcingroup,項目名稱:C471510_JDMask,代碼行數:7,代碼來源:NewsDataController.cs

示例6: Put

        public async Task<IHttpActionResult> Put([FromBody]IdentityRole md)
        {
            ResultInfo r = new ResultInfo();
            try
            {
                //var item = await roleManager.FindByIdAsync(md.Id);

                //item.Name = md.Name;

                var result = await roleManager.UpdateAsync(md);
                if (result.Succeeded)
                {
                    r.result = true;
                }
                else
                {
                    r.message = String.Join(":", result.Errors);
                    r.result = false;
                }
            }
            catch (Exception ex)
            {
                r.result = false;
                r.message = ex.ToString();
            }
            return Ok(r);
        }
開發者ID:jcingroup,項目名稱:C491601_Alder,代碼行數:27,代碼來源:RolesController.cs

示例7: aj_MasterUpdate

        public string aj_MasterUpdate(parm md)
        {
            ResultInfo rAjaxResult = new ResultInfo();
            try
            {
                var open = openLogic();
                using (db0 = open.getDB0)
                {
                    open.setParmValue(ParmDefine.bufferNorth_Max,md.bufferNorth_Max);
                    open.setParmValue(ParmDefine.bufferSouth_Max, md.bufferSouth_Max);
                    open.setParmValue(ParmDefine.N_Max_joinnum, md.N_Max_joinnum);
                    open.setParmValue(ParmDefine.S_Max_joinnum, md.S_Max_joinnum);
                    open.setParmValue(ParmDefine.receiveMails, md.receiveMails);
                    open.setParmValue(ParmDefine.BccMails, md.BccMails);

                }
                rAjaxResult.result = true;
            }
            catch (Exception ex)
            {
                rAjaxResult.result = false;
                rAjaxResult.message = ex.Message;
            }
            return defJSON(rAjaxResult);
        }
開發者ID:jcincloud,項目名稱:C321408_TaoyuanAlgal,代碼行數:25,代碼來源:PMDataController.cs

示例8: Put

        public async Task<IHttpActionResult> Put([FromBody]ApplicationUser md)
        {
            ResultInfo r = new ResultInfo();
            try
            {
                ApplicationUser item = await UserManager.FindByIdAsync(md.Id);

                item.UserName = md.UserName;
                item.Email = md.Email;
                item.user_name_c = md.user_name_c;

                var result = await UserManager.UpdateAsync(item);
                if (result.Succeeded)
                {
                    r.result = true;
                }
                else
                {
                    r.message = String.Join(":", result.Errors);
                    r.result = false;
                }
            }
            catch (Exception ex)
            {
                r.result = false;
                r.message = ex.ToString();
            }
            return Ok(r);
        }
開發者ID:jcingroup,項目名稱:C451508_Smith,代碼行數:29,代碼來源:RolesController.cs

示例9: DeleteEvapDetailExcelData

        public IHttpActionResult DeleteEvapDetailExcelData()
        {
            #region 連接BusinessLogicLibary資料庫並取得資料

            ResultInfo r = new ResultInfo();
            db0 = getDB0();
            try
            {
                var getFuelItem = db0.Apply_Detail_Evaporate.Where(x => x.userid == this.UserId && x.y == allowApplyYear);
                db0.Apply_Detail_Evaporate.RemoveRange(getFuelItem);

                db0.SaveChanges();
                r.result = true;
                return Ok(r);
            }
            catch (Exception ex)
            {
                r.message = ex.Message;
                r.result = false;
                return Ok(r);
            }
            finally
            {
                db0.Dispose();
            }

            #endregion
        }
開發者ID:jcincloud,項目名稱:C071415_EEI_Electronic,代碼行數:28,代碼來源:DeleteActionController.cs

示例10: Post

 public async Task<IHttpActionResult> Post([FromBody]AspNetRoles md)
 {
     ResultInfo r = new ResultInfo();
     try
     {
         if (!await roleManager.RoleExistsAsync(md.Name))
         {
             var result = await roleManager.CreateAsync(new IdentityRole(md.Name));
             if (result.Succeeded)
             {
                 var item = await roleManager.FindByNameAsync(md.Name);
                 r.result = true;
                 r.aspnetid = item.Id;
             }
             else
             {
                 r.result = false;
                 r.message = string.Join(":", result.Errors.ToArray());
             }
         }
         else
         {
             r.result = false;
             r.message = "The role " + md.Name + " has exist!";
         }
         return Ok(r);
     }
     catch (Exception ex)
     {
         r.result = false;
         r.message = ex.Message;
         return Ok(r);
     }
 }
開發者ID:jcingroup,項目名稱:C451508_Smith,代碼行數:34,代碼來源:RolesController.cs

示例11: aj_MasterUpdate

        //[ValidateInput(false)]
        public string aj_MasterUpdate(parm md)
        {
            ResultInfo rAjaxResult = new ResultInfo();
            try
            {
                var open = openLogic();

                using (db0 = getDB0())
                {
                    ////產品規格
                    //open.setParmValue(ParmDefine.surfacehandle, md.surfacehandle);
                    //open.setParmValue(ParmDefine.layer, md.layer);
                    //信件
                    open.setParmValue(ParmDefine.receiveMails, md.receiveMails);
                    //open.setParmValue(ParmDefine.BccMails, md.BccMails);
                }
                rAjaxResult.result = true;
            }
            catch (Exception ex)
            {
                rAjaxResult.result = false;
                rAjaxResult.message = ex.Message;
            }
            return defJSON(rAjaxResult);
        }
開發者ID:jcingroup,項目名稱:C381421_ChengShen,代碼行數:26,代碼來源:ParmDataController.cs

示例12: Get

        public async Task<IHttpActionResult> Get(string id)
        {
            using (db0 = getDB0())
            {
                ApplicationUser item = await UserManager.FindByIdAsync(id);
                var get_user_roles = item.Roles;
                var system_roles = await roleManager.Roles.Where(x => x.Name != "Admins").ToListAsync();
                item.role_array = new List<RoleArray>();
                foreach (var role in system_roles)
                {
                    var role_object = get_user_roles.Where(x => x.RoleId == role.Id).FirstOrDefault();
                    if (role_object != null)
                    {
                        item.role_array.Add(new RoleArray() { role_id = role.Id, role_use = true, role_name = role.Name });
                    }
                    else
                    {
                        item.role_array.Add(new RoleArray() { role_id = role.Id, role_use = false, role_name = role.Name });
                    }
                }

                var r = new ResultInfo<ApplicationUser>() { data = item };
                return Ok(r);
            }
        }
開發者ID:jcincloud,項目名稱:C431505_Mami520,代碼行數:25,代碼來源:UsersController.cs

示例13: DeleteMonthExcelData

        public IHttpActionResult DeleteMonthExcelData()
        {
            #region 連接BusinessLogicLibary資料庫並取得資料

            ResultInfo r = new ResultInfo();
            db0 = getDB0();
            try
            {
                var getMonthItem = db0.Apply_MonthAverage.Where(x => x.USERID == this.UserId && x.Y == allowApplyYear);
                db0.Apply_MonthAverage.RemoveRange(getMonthItem);

                db0.SaveChanges();
                r.result = true;
                return Ok(r);
            }
            catch (Exception ex)
            {
                r.message = ex.Message;
                r.result = false;
                return Ok(r);
            }
            finally
            {
                db0.Dispose();
            }

            #endregion
        }
開發者ID:jcincloud,項目名稱:C071416_EEI_Textile,代碼行數:28,代碼來源:DeleteActionController.cs

示例14: Get

 public async Task<IHttpActionResult> Get(string id)
 {
     using (db0 = getDB0())
     {
         var item = await roleManager.FindByIdAsync(id);
         var r = new ResultInfo<IdentityRole>() { data = item };
         return Ok(r);
     }
 }
開發者ID:jcingroup,項目名稱:C451508_Smith,代碼行數:9,代碼來源:RolesController.cs

示例15: axFSort

        public string axFSort(int id, string filekind, IList<JsonFileInfo> file_object)
        {
            ResultInfo r = new ResultInfo();
            if (filekind == "Banner")
                rewriteJsonFile(id, filekind, "Banner", "Banner", file_object);

            r.result = true;
            return defJSON(r);
        }
開發者ID:jcincloud,項目名稱:C411503_FLStudy,代碼行數:9,代碼來源:BannerController.cs


注:本文中的ProcCore.HandleResult.ResultInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。