Exemplo n.º 1
0
 /// <summary>
 /// 获取数据
 /// </summary>
 protected override void LoadData()
 {
     if (!NetUtil.CheckNetWork(CurrActivity))
     {
         ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
         return;
     }
     else
     {
         LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");
         GetTeacherListByScope();
     }
 }
 /// <summary>
 /// 刷新
 /// </summary>
 public void OnRefresh()
 {
     if (!NetUtil.CheckNetWork(CurrActivity))
     {
         ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
         return;
     }
     else
     {
         LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");
         BindData();
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// 删除教师信息
        /// </summary>
        private void DoDelete()
        {
            try
            {
                if (!NetUtil.CheckNetWork(CurrActivity))
                {
                    ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                    return;
                }


                LoadingDialogUtil.ShowLoadingDialog(this, "删除中...");

                new Thread(new ThreadStart(() =>
                {
                    var schoolId = CurrUserInfo.SchoolId;
                    var type     = 1;                                         //type = 1 助教相关身份 type = 2 教师相关身份
                    var keyword  = currAssistant.Mobile;
                    var modifier = CurrUserInfo.Name;
                    var rd       = _meService.DeleteManagerUser(schoolId, type.ToString(), keyword, modifier);

                    RunOnUiThread(() =>
                    {
                        LoadingDialogUtil.DismissLoadingDialog();
                        if (rd.State == 0)
                        {
                            ToastUtil.ShowErrorToast(this, (string.IsNullOrEmpty(rd.Error) ? "操作失败" : rd.Error));
                        }
                        else
                        {
                            ToastUtil.ShowSuccessToast(this, "操作成功");
                            new Handler().PostDelayed(() =>
                            {
                                Finish();
                                OverridePendingTransition(Resource.Animation.left_in, Resource.Animation.right_out);
                            }, 1000);
                        }
                    });
                })).Start();
            }
            catch (Exception ex)
            {
                var msg = ex.Message.ToString();
                ToastUtil.ShowErrorToast(this, "操作失败");
            }
            finally
            {
                LoadingDialogUtil.DismissLoadingDialog();
            }
        }
Exemplo n.º 4
0
        protected void SetClassStatusImg(ImageButton imgButton, string operateType)
        {
            //开课中图片
            var imgButtonDrawable = Resource.Drawable.lesson_ing;

            if (operateType == "clickButton")
            {
                if (classStatus == 1)                 //当前开课中,点击切换为全部
                {
                    classStatus       = 3;
                    imgButtonDrawable = Resource.Drawable.lesson_all;
                }
                else
                {
                    classStatus = 1;
                }
            }
            else
            {
                //全部
                if (classStatus == 3)
                {
                    imgButtonDrawable = Resource.Drawable.lesson_all;
                }
            }

            var image = AppUtils.GetDrawable(CurrContext, imgButtonDrawable);

            imgButton.SetImageDrawable(image);

            //android4.4.4 下面这段报错
            //if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) //> Android 5.0
            //{
            //	var image = ContextCompat.GetDrawable(CurrActivity.ApplicationContext, imgButtonDrawable);
            //	imgButton.SetImageDrawable(image);
            //}
            //else
            //{
            //	var image = Android.Support.Graphics.Drawable.VectorDrawableCompat.Create(this.Resources, imgButtonDrawable, null);
            //	imgButton.SetImageDrawable(image);
            //}

            //切换按钮状态(默认页面初始化)
            if (operateType == "clickButton")
            {
                LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");
                GetRenewInfoInTeacherByGroupCode();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// 获取报表数据
        /// </summary>
        public void BindData()
        {
            try
            {
                if (!NetUtil.CheckNetWork(CurrActivity))
                {
                    ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                    return;
                }
                LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");

                var schoolId = CurrUserInfo.SchoolId;
                var year     = searchQuarter.Year;
                var quarter  = searchQuarter.Quarter;
                var district = searchDistrict;

                //加校区查询权限判断--店长登录
                var areaCodes = "";
                if (CurrUserInfo.Type == (int)UserType.ShopManager)
                {
                    areaCodes = CurrUserInfo.AreaCodes;
                }

                new Thread(new ThreadStart(() =>
                {
                    var list = BudgetService.GetAreaPaymentList(schoolId, year, quarter, district, sortType, dataType, areaCodes);
                    CurrActivity.RunOnUiThread(() =>
                    {
                        LoadingDialogUtil.DismissLoadingDialog();
                        mSwipeRefreshLayout.Refreshing = false;

                        if (list != null)
                        {
                            paymentList = list;
                            mAdapter.SetData(paymentList);
                            mAdapter.NotifyDataSetChanged();
                        }
                    });
                })).Start();
            }
            catch (Exception ex)
            {
                var msg = ex.Message.ToString();
                LoadingDialogUtil.DismissLoadingDialog();
                mSwipeRefreshLayout.Refreshing = false;
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// 页面数据
        /// </summary>
        protected void LoadData()
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            else
            {
                LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");

                if (BaseApplication.GetInstance().quarterList == null || !BaseApplication.GetInstance().quarterList.Any())
                {
                    BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId);
                }
                if (BaseApplication.GetInstance().gradeList == null)
                {
                    BaseApplication.GetInstance().gradeList = RenewService.GetGradeList(CurrUserInfo.SchoolId);
                }

                GetRenewData();

                // 财年选择
                #region
                if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any())
                {
                    tv_year.Visibility = ViewStates.Visible;
                    tv_year.Click     += (sender, e) =>
                    {
                        if (financialYearPopWin == null)
                        {
                            financialYearPopWin            = new PopWin_IndexFinancialYear(CurrActivity, BaseApplication.GetInstance().quarterList);
                            financialYearPopWin.clickItem += new PopWin_IndexFinancialYear.ClickItem(clickFinancialYear);
                        }

                        financialYearPopWin.OutsideTouchable = true;
                        if (!financialYearPopWin.IsShowing)
                        {
                            financialYearPopWin.ShowAsDropDown(tv_year, 0, -15);
                        }
                    };
                }
                #endregion
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 获取数据
        /// </summary>
        protected override void LoadData()
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            else
            {
                LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");
                GetTeacherScopeListByGrade();

                //mSwipeRefreshLayout.PostDelayed(() =>
                //{
                //    mSwipeRefreshLayout.Refreshing = true;
                //    GetTeacherScopeListByGrade();
                //}, 0);
            }
        }
Exemplo n.º 8
0
        /// <summary>
        /// 页面数据
        /// </summary>
        protected void LoadData()
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");

            if (BaseApplication.GetInstance().quarterList == null)
            {
                BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId);
            }
            if (BaseApplication.GetInstance().gradeList == null)
            {
                BaseApplication.GetInstance().gradeList = RenewService.GetGradeList(CurrUserInfo.SchoolId);
            }
            if (BaseApplication.GetInstance().districtList == null)
            {
                BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(CurrUserInfo.SchoolId);
            }

            if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any())
            {
                quarterList   = BaseApplication.GetInstance().quarterList;
                searchQuarter = BaseApplication.GetInstance().quarterList.Find(t => t.IsCurrent);
                tv_btn1.Text  = searchQuarter.QuarterName;
            }
            if (BaseApplication.GetInstance().gradeList != null && BaseApplication.GetInstance().gradeList.Any())
            {
                gradeList = new List <string>(BaseApplication.GetInstance().gradeList.Select(i => i.GradeName).ToArray());
                // 默认全选
                searchGradeList = new List <string>(gradeList.ToArray());
            }
            if (BaseApplication.GetInstance().districtList != null && BaseApplication.GetInstance().districtList.Any())
            {
                districtList = new List <string>(BaseApplication.GetInstance().districtList.Select(i => i.DistrictName).ToArray());
            }


            GetRenewInfoInGroup();
        }
Exemplo n.º 9
0
        /// <summary>
        /// 获取数据
        /// </summary>
        protected override void LoadData()
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");

            if (BaseApplication.GetInstance().quarterList == null)
            {
                BaseApplication.GetInstance().quarterList = RenewService.GetQuarter(CurrUserInfo.SchoolId);
            }
            if (BaseApplication.GetInstance().gradeList == null)
            {
                BaseApplication.GetInstance().gradeList = RenewService.GetGradeList(CurrUserInfo.SchoolId);
            }
            if (BaseApplication.GetInstance().districtList == null)
            {
                BaseApplication.GetInstance().districtList = RenewService.GetDistrictList(CurrUserInfo.SchoolId);
            }

            if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any())
            {
                quarterList = BaseApplication.GetInstance().quarterList;
            }
            if (searchQuarter != null)
            {
                tv_btn1.Text = searchQuarter.QuarterName;
            }
            else
            {
                if (BaseApplication.GetInstance().quarterList != null && BaseApplication.GetInstance().quarterList.Any())
                {
                    searchQuarter = BaseApplication.GetInstance().quarterList.Find(t => t.IsCurrent);
                    tv_btn1.Text  = searchQuarter.QuarterName;
                }
            }
            if (BaseApplication.GetInstance().gradeList != null && BaseApplication.GetInstance().gradeList.Any())
            {
                gradeList = new List <string>(BaseApplication.GetInstance().gradeList.Select(i => i.GradeName).ToArray());
            }
            if (searchGradeList != null && searchGradeList.Any())
            {
                var selectedgrade = "全部年级";
                if (searchGradeList.Count > 0 && searchGradeList.Count != gradeList.Count)
                {
                    selectedgrade = string.Join(",", searchGradeList.ToArray());
                }

                tv_btn2.Text = selectedgrade;
            }
            else
            {
                // 默认全选
                searchGradeList = new List <string>(gradeList.ToArray());
            }
            if (BaseApplication.GetInstance().districtList != null && BaseApplication.GetInstance().districtList.Any())
            {
                districtList = new List <string>(BaseApplication.GetInstance().districtList.Select(i => i.DistrictName).ToArray());
            }
            if (!string.IsNullOrEmpty(searchDistrict))
            {
                tv_btn3.Text = searchDistrict;
            }


            LoadingDialogUtil.ShowLoadingDialog(CurrActivity, "获取数据中...");
            GetRenewInfoInTeacherByGroupCode();
        }
Exemplo n.º 10
0
        /// <summary>
        /// 保存教师信息
        /// </summary>
        /// <param name="isContinueAdd">isContinueAdd=true:连续保存</param>
        private void DoSave(bool isContinueAdd)
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            try
            {
                var tcode  = et_teachercode.Text.Trim();
                var tname  = et_teachername.Text.Trim();
                var temail = et_teacheramount.Text.Trim();
                if (string.IsNullOrEmpty(tcode))
                {
                    ToastUtil.ShowWarningToast(this, "请输入教师编码");
                    et_teachercode.RequestFocus();
                    return;
                }
                if (string.IsNullOrEmpty(temail))
                {
                    ToastUtil.ShowWarningToast(this, "请输入登录账号");
                    et_teacheramount.RequestFocus();
                    return;
                }
                if (!CheckUtil.IsValidEmail(temail))
                {
                    ToastUtil.ShowWarningToast(this, "登录账号应为邮箱");
                    et_teacheramount.RequestFocus();
                    return;
                }
                if (string.IsNullOrEmpty(tname))
                {
                    ToastUtil.ShowWarningToast(this, "请输入姓名");
                    et_teachername.RequestFocus();
                    return;
                }
                if (tScopeCode == 0)
                {
                    ToastUtil.ShowWarningToast(this, "请选择教研组");
                    return;
                }
                if (tType == 0)
                {
                    ToastUtil.ShowWarningToast(this, "请选择角色");
                    return;
                }


                LoadingDialogUtil.ShowLoadingDialog(this, "保存中...");

                new Thread(new ThreadStart(() =>
                {
                    //新增操作
                    var model      = new ManagerUserInfo();
                    model.Code     = tcode;
                    model.Email    = temail;
                    model.Name     = tname;
                    model.UserType = tType;
                    if (model.UserType == (int)UserType.TeacherDirector || model.UserType == (int)UserType.TeacherArea)
                    {
                        model.IsCanLogin = true;
                    }
                    else
                    {
                        model.IsCanLogin = false;
                    }
                    model.SchoolId = CurrUserInfo.SchoolId;
                    model.Creator  = CurrUserInfo.Name;
                    model.Modifier = CurrUserInfo.Name;

                    DataEntity.Result resultData;

                    if (isNewAdd)
                    {
                        resultData = _meService.AddManagerUser(model, "", "", tScopeCode);
                    }
                    else
                    {
                        resultData = _meService.UpdateManagerUser(model, "", "", tScopeCode);
                    }

                    RunOnUiThread(() =>
                    {
                        LoadingDialogUtil.DismissLoadingDialog();
                        if (resultData.State == 1)
                        {
                            ToastUtil.ShowSuccessToast(this, "操作成功");

                            currTeacher.Name      = tname;
                            currTeacher.Email     = temail;
                            currTeacher.Code      = tcode;
                            currTeacher.ScopeCode = tScopeCode;
                            currTeacher.Type      = tType;
                            if (BaseApplication.GetInstance().teacherList != null)
                            {
                                if (isNewAdd)
                                {
                                    BaseApplication.GetInstance().teacherList.Add(currTeacher);
                                }
                                else
                                {
                                    if (scopeName != currTeacher.ScopeName)
                                    {
                                        BaseApplication.GetInstance().teacherList.Remove(currTeacher);
                                    }
                                }
                            }


                            //保存并继续添加爱
                            if (isContinueAdd)
                            {
                                currTeacher           = new TeacherListModel();
                                et_teachercode.Text   = "";
                                et_teachername.Text   = "";
                                et_teacheramount.Text = "";
                                tvRoleLabel.Text      = "未设置";
                                tvRoleLabel.SetTextColor(new Color(ContextCompat.GetColor(CurrActivity, Resource.Color.textColorSecond)));
                                tvScoleLabel.Text = "未设置";
                                tvScoleLabel.SetTextColor(new Color(ContextCompat.GetColor(CurrActivity, Resource.Color.textColorSecond)));
                            }
                            //完成
                            else
                            {
                                new Handler().PostDelayed(() =>
                                {
                                    Finish();
                                    OverridePendingTransition(Resource.Animation.left_in, Resource.Animation.right_out);
                                }, 1000);
                            }
                        }
                        else
                        {
                            ToastUtil.ShowErrorToast(this, (string.IsNullOrEmpty(resultData.Error) ? "操作失败" : resultData.Error));
                        }
                    });
                })).Start();
            }
            catch (Exception ex)
            {
                var msg = ex.Message.ToString();
                ToastUtil.ShowErrorToast(this, "操作失败");
                LoadingDialogUtil.DismissLoadingDialog();
            }
        }
Exemplo n.º 11
0
 public override void OnPageStarted(WebView view, string url, Android.Graphics.Bitmap favicon)
 {
     //base.OnPageStarted(view, url, favicon);
     LoadingDialogUtil.ShowLoadingDialog(view.Context, "获取数据中...");
 }
Exemplo n.º 12
0
        /// <summary>
        /// 添加/编辑店长信息
        /// </summary>
        /// <param name="isContinueAdd">isContinueAdd=true:连续保存</param>
        private void DoSave(bool isContinueAdd)
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            try
            {
                var tname  = etName.Text.Trim();
                var temail = etEmail.Text.Trim();

                if (string.IsNullOrEmpty(tname))
                {
                    ToastUtil.ShowWarningToast(this, "请输入姓名");
                    etName.RequestFocus();
                    return;
                }
                if (!CheckUtil.IsValidEmail(temail))
                {
                    ToastUtil.ShowWarningToast(this, "邮箱格式不正确");
                    etEmail.RequestFocus();
                    return;
                }

                if (string.IsNullOrEmpty(tvAreaCodes.Text.Trim()))
                {
                    ToastUtil.ShowWarningToast(this, "请选择门店");
                    return;
                }



                LoadingDialogUtil.ShowLoadingDialog(this, "保存中...");

                new Thread(new ThreadStart(() =>
                {
                    //新增操作
                    var model          = new ManagerUserInfo();
                    model.Email        = etEmail.Text;
                    model.Name         = etName.Text;
                    model.UserType     = Convert.ToInt32(UserType.ShopManager);
                    model.IsCanLogin   = true;
                    model.SchoolId     = CurrUserInfo.SchoolId;
                    model.Creator      = CurrUserInfo.Name;
                    model.Modifier     = CurrUserInfo.Name;
                    model.DistrictCode = CurrUserInfo.DistrictCode;



                    DataEntity.Result resultData = new DataEntity.Result();

                    if (isNewAdd)
                    {
                        resultData = _meService.AddShopManager(model, AreaCodes, AreaNames);
                    }
                    else
                    {
                        var codeArr = AreaCodes.Split(',');
                        var nameArr = AreaNames.Split(',');
                        var list    = new List <UserAreaRelationModel>();
                        for (int i = 0; i < codeArr.Length; i++)
                        {
                            var relation      = new UserAreaRelationModel();
                            relation.AreaCode = codeArr[i];
                            relation.AreaName = nameArr[i];
                            relation.Email    = etEmail.Text;
                            relation.UserType = (int)UserType.ShopManager;
                            relation.Creator  = CurrUserInfo.Name;
                            relation.Modifier = CurrUserInfo.Name;
                            relation.SchoolId = CurrUserInfo.SchoolId;
                            list.Add(relation);
                        }
                        resultData = _meService.SaveUserArea(list);
                    }

                    RunOnUiThread(() =>
                    {
                        LoadingDialogUtil.DismissLoadingDialog();
                        if (resultData.State == 1)
                        {
                            ToastUtil.ShowSuccessToast(this, "操作成功");
                            //保存并继续添加
                            if (isContinueAdd)
                            {
                                currShopManager  = new ShopManagerList();
                                etName.Text      = "";
                                etEmail.Text     = "";
                                tvAreaNames.Text = "未设置";
                            }
                            //完成
                            else
                            {
                                new Handler().PostDelayed(() =>
                                {
                                    Finish();
                                    OverridePendingTransition(Resource.Animation.left_in, Resource.Animation.right_out);
                                }, 1000);
                            }
                        }
                        else
                        {
                            ToastUtil.ShowErrorToast(this, (string.IsNullOrEmpty(resultData.Error) ? "操作失败" : resultData.Error));
                        }
                    });
                })).Start();
            }
            catch (Exception ex)
            {
                var msg = ex.Message.ToString();
                ToastUtil.ShowErrorToast(this, "操作失败");
                LoadingDialogUtil.DismissLoadingDialog();
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// 登录操作
        /// </summary>
        public void DoLogin()
        {
            var account = etAccount.Text.Trim();

            if (string.IsNullOrEmpty(account))
            {
                ToastUtil.ShowWarningToast(this, "请输入您的手机号码或者邮箱");
                etAccount.RequestFocus();
                return;
            }
            if (!CheckUtil.IsValidEmail(account) && !CheckUtil.IsValidPhone(account))
            {
                ToastUtil.ShowWarningToast(this, "登录账号错误");
                etAccount.RequestFocus();
                return;
            }

            var passwrod = etPassword.Text.Trim();

            if (string.IsNullOrEmpty(passwrod))
            {
                ToastUtil.ShowWarningToast(this, "请输入您的登录密码");
                etPassword.RequestFocus();
                return;
            }

            if (!NetUtil.CheckNetWork(this))
            {
                ToastUtil.ShowWarningToast(this, "网络未连接!");
                return;
            }


            LoadingDialogUtil.ShowLoadingDialog(this, "登录中...");

            try
            {
                new Thread(new ThreadStart(() =>
                {
                    var result = DataService.UserService.GetUser(account, passwrod);
                    RunOnUiThread(() =>
                    {
                        LoadingDialogUtil.DismissLoadingDialog();
                        if (result.State == 1 && result.Data != null)
                        {
                            var loginUserJson = Helper.ToJsonItem(result.Data);
                            SharedPreferencesUtil.SetParam(this, AppConfig.SP_LAST_LOGIN_ACCOUNT, account);
                            SharedPreferencesUtil.SetParam(this, AppConfig.SP_USERINFO, loginUserJson);

                            Intent intent = new Intent(this, typeof(Main));
                            StartActivity(intent);
                            OverridePendingTransition(Android.Resource.Animation.FadeIn, Android.Resource.Animation.FadeOut);
                            this.Finish();
                        }
                        else
                        {
                            ToastUtil.ShowWarningToast(this, result.Error ?? "登录失败");
                        }
                    });
                })).Start();
            }
            catch (Exception ex)
            {
                var msg = ex.Message.ToString();
                LoadingDialogUtil.DismissLoadingDialog();
                ToastUtil.ShowWarningToast(this, msg);
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// 保存教师信息
        /// </summary>
        /// <param name="isContinueAdd">isContinueAdd=true:连续保存</param>
        private void DoSave(bool isContinueAdd)
        {
            if (!NetUtil.CheckNetWork(CurrActivity))
            {
                ToastUtil.ShowWarningToast(CurrActivity, "网络未连接!");
                return;
            }
            try
            {
                currAssistant.Name   = etName.Text.Trim();
                currAssistant.Mobile = etAmount.Text.Trim();
                if (string.IsNullOrEmpty(currAssistant.Name))
                {
                    ToastUtil.ShowWarningToast(this, "请输入姓名");
                    etName.RequestFocus();
                    return;
                }

                if (!Helper.IsMobile(currAssistant.Mobile))
                {
                    ToastUtil.ShowWarningToast(this, "请输入正确的手机号");
                    etAmount.RequestFocus();
                    return;
                }
                if (string.IsNullOrEmpty(currAssistant.AreaCode))
                {
                    ToastUtil.ShowWarningToast(this, "请选择教学区");
                    etAmount.RequestFocus();
                    return;
                }

                LoadingDialogUtil.ShowLoadingDialog(this, "保存中...");

                new Thread(new ThreadStart(() =>
                {
                    //新增操作
                    var model        = new ManagerUserInfo();
                    model.Mobile     = currAssistant.Mobile;
                    model.Name       = currAssistant.Name;
                    model.IsCanLogin = false;
                    model.UserType   = (int)UserType.AssistantLeader;
                    model.SchoolId   = CurrUserInfo.SchoolId;
                    model.Creator    = CurrUserInfo.Name;
                    model.Modifier   = CurrUserInfo.Name;
                    var resultData   = _meService.AddManagerUser(model, currAssistant.AreaCode, currAssistant.AreaName, 0);

                    RunOnUiThread(() =>
                    {
                        LoadingDialogUtil.DismissLoadingDialog();
                        if (resultData.State == 1)
                        {
                            ToastUtil.ShowSuccessToast(this, "操作成功");
                            //保存并继续添加爱
                            if (isContinueAdd)
                            {
                                currAssistant = new AstLeaderListModel();
                                etName.Text   = "";
                                etAmount.Text = "";
                                tvArea.Text   = "未设置";
                                tvArea.SetTextColor(new Color(ContextCompat.GetColor(CurrActivity, Resource.Color.textColorSecond)));
                            }
                            //完成
                            else
                            {
                                new Handler().PostDelayed(() =>
                                {
                                    Finish();
                                    OverridePendingTransition(Resource.Animation.left_in, Resource.Animation.right_out);
                                }, 1000);
                            }
                        }
                        else
                        {
                            ToastUtil.ShowErrorToast(this, (string.IsNullOrEmpty(resultData.Error) ? "操作失败" : resultData.Error));
                        }
                    });
                })).Start();
            }
            catch (Exception ex)
            {
                var msg = ex.Message.ToString();
                ToastUtil.ShowErrorToast(this, "操作失败");
            }
            finally
            {
                LoadingDialogUtil.DismissLoadingDialog();
            }
        }