Example #1
0
        public ActionResult Add(Base_Role model)
        {
            //权限检查
            Helper.IsCheck(HttpContext, AdminModule.AdminRole.ToString(), SystemRight.Add.ToString(), true);

            ResultView <int>  view       = new ResultView <int>();
            ResultView <bool> checkRight = new ResultView <bool>();

            if (string.IsNullOrEmpty(model.RoleName))
            {
                view.Flag    = false;
                view.Message = "角色名不能为空";
                return(Json(view));
            }

            model.Belong = RoleType.Owner.ToString();

            Result <int> result = new Result <int>();

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddRole(model);
                view   = result.ToResultView();
            }
            return(Json(view));
        }
Example #2
0
        public ActionResult Edit(ChangeView model)
        {
            ResultView <int> view = new ResultView <int>();

            //表单校验
            if (string.IsNullOrEmpty(model.ChangeName))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            List <Base_Files> fileList     = new List <Base_Files>();
            string            fileDataJson = Request.Form["fileDataJsonFile"];//获取上传文件json字符串

            if (!string.IsNullOrEmpty(fileDataJson))
            {
                fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson);//将文件信息json字符
            }

            string dataChangeCompany = Request.Form["CompanyIds"];

            if (!string.IsNullOrEmpty(dataChangeCompany))
            {
                model.Epm_ChangeCompany = JsonConvert.DeserializeObject <List <Epm_ChangeCompany> >(dataChangeCompany);
            }

            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateChange(model, fileList);
            }
            return(Json(result.ToResultView()));
        }
        public ActionResult Add(Epm_Milepost model, string dataConfigId)
        {
            ResultView <int> view = new ResultView <int>();

            //表单校验
            if (string.IsNullOrEmpty(model.ParentId.ToString()))
            {
                view.Flag    = false;
                view.Message = "项目性质不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                List <long> list = dataConfigId.SplitString(",").ToLongList();
                result = proxy.AddMilepostAndData(model, list);
            }
            return(Json(result.ToResultView()));
        }
        public ActionResult Edit(Msg_SMSTemplete model)
        {
            Result <int>     result = new Result <int>();
            ResultView <int> view   = new ResultView <int>();

            if (Request.Form["IsEnable"] == EnumState.Enable.ToString())
            {
                model.IsEnable = true;
            }
            else
            {
                model.IsEnable = false;
            }
            if (Request.Form["IsConfirm"] == EnumState.Confirmed.ToString())
            {
                model.IsConfirm = true;
            }
            else
            {
                model.IsConfirm = false;
            }
            using (MessageClientProxy proxy = new MessageClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateSMSTemplete(model);
                view   = result.ToResultView();
            }
            return(Json(view));
        }
        public ActionResult EditCrossingsAndTimeManage(Epm_TimeLimitAndProcedure model)
        {
            if (model.ProjectId == 0)
            {
                ResultView <int> view = new ResultView <int>();
                view.Flag    = false;
                view.Message = "项目id不能为空";
                return(Json(view));
            }
            #region 工期和手续提交
            //上传附件
            List <Epm_TzAttachs> attachs = new List <Epm_TzAttachs>();
            string fileDataJson          = Request.Form["fileDataJson"];//获取上传文件json字符串--注意附件类型,手续没有类型,给一个默认的类型SHOUXU
            if (!string.IsNullOrEmpty(fileDataJson))
            {
                var attach = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson);//将文件信息json字符
                attachs.AddRange(attach);
                model.TzAttachs = attach;
            }

            Result <int> result = new Result <int>();
            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateTimeLimitAndCrossings(model);
            }
            #endregion

            return(Json(result.ToResultView()));
        }
        public ActionResult UpdateState(string ids, string state)
        {
            ResultView <int> view = new ResultView <int>();

            if (string.IsNullOrEmpty(ids))
            {
                view.Flag    = false;
                view.Message = "请选择要操作的数据";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(state))
            {
                view.Flag    = false;
                view.Message = "状态不能为空";
                return(Json(view));
            }
            List <long> idList = ids.SplitString(",").ToLongList();

            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateTzProjectStartApplyState(idList, state);
            }
            return(Json(result.ToResultView()));
        }
Example #7
0
        public ActionResult Edit(Epm_Milepost model, string dataConfigID)
        {
            List <long>         list   = dataConfigID.SplitString(",").ToLongList();
            Result <int>        result = new Result <int>();
            ResultView <string> view   = new ResultView <string>();

            if (string.IsNullOrEmpty(model.ParentId.ToString()))
            {
                view.Flag    = false;
                view.Message = "里程碑分类不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            Result <Epm_Milepost> companyResult = new Result <Epm_Milepost>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateMilepost(model, list);
            }
            return(Json(result.ToResultView()));
        }
Example #8
0
        public List <ResultView> GetAllResult()
        {
            List <ResultView> resultList = new List <ResultView>();
            string            query      = "SELECT EnrollCourse.StudenId, Course.CourseCode, Course.CourseName, Grade.Grade FROM EnrollCourse LEFT JOIN Result ON Result.StudentId = EnrollCourse.StudenId LEFT JOIN Course ON Course.CourseId = EnrollCourse.CourseId LEFT JOIN Grade ON Grade.GradeId = Result.GradeId WHERE EnrollCourse.Status = 1";

            Command = new SqlCommand(query, Connection);
            Connection.Open();
            Reader = Command.ExecuteReader();
            if (Reader.HasRows)
            {
                while (Reader.Read())
                {
                    ResultView resultView = new ResultView();
                    resultView.StudenId   = Convert.ToInt32(Reader["StudenId"]);
                    resultView.CourseCode = Reader["CourseCode"].ToString();
                    resultView.CourseName = Reader["CourseName"].ToString();
                    resultView.Grade      = Reader["Grade"].ToString();

                    resultList.Add(resultView);
                }
                Reader.Close();
            }
            Connection.Close();
            return(resultList);
        }
        public ActionResult AddDetails(Epm_TemplateDetails model)
        {
            ResultView <string> view = new ResultView <string>();

            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            if (model.ParentId == null)
            {
                view.Flag    = false;
                view.Message = "父级不能为空";
                return(Json(view));
            }
            if (model.TemplateId == null)
            {
                view.Flag    = false;
                view.Message = "模板Id不能为空";
                return(Json(view));
            }
            Result <long> result = new Result <long>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddTemplateDetails(model);
            }
            return(Json(result.ToResultView()));
        }
Example #10
0
        protected override void Initialise()
        {
            View      = new ResultView();
            ViewModel = View.DataContext as ResultViewModel;

            MainView.SetPluginArea(View);
        }
Example #11
0
        public ActionResult Add(Epm_News model)
        {
            ResultView <int> view = new ResultView <int>();

            string fileDataJson = Request.Form["fileDataJson"];                                            //获取上传文件json字符串

            List <Base_Files> fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符

            //表单校验
            if (string.IsNullOrEmpty(model.NewsTitle))
            {
                view.Flag    = false;
                view.Message = "新闻标题不能为空";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            Result <int> result = new Result <int>();

            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddNews(model, fileList);
            }
            return(Json(result.ToResultView()));
        }
Example #12
0
        public List <ResultView> GetResultViewByStudent(int studentId)
        {
            string query = "SELECT C.CourseCode, C.CourseName, G.GradeLetter FROM Enrollments E LEFT JOIN Courses C ON E.CourseId = C.CourseId LEFT JOIN StudentResults R ON ( E.StudentId = R.StudentId AND E.CourseId = R.CourseId AND E.IsCurrent = R.IsCurrent ) LEFT JOIN Grades G ON R.GradeId = G.GradeId WHERE E.StudentId =@studentId AND E.IsCurrent =1 ORDER BY C.CourseCode ASC";

            using (connection = new SqlConnection(connectionString))
                using (SqlCommand command = new SqlCommand(query, connection))
                {
                    command.Parameters.Clear();
                    command.Parameters.Add("studentId", sqlDbType: SqlDbType.Int);
                    command.Parameters["studentId"].Value = studentId;

                    List <ResultView> resultViews = new List <ResultView>();
                    connection.Open();
                    SqlDataReader reader = command.ExecuteReader();
                    while (reader.Read())
                    {
                        ResultView aResultView = new ResultView
                        {
                            CourseCode  = reader["CourseCode"].ToString(),
                            CourseName  = reader["CourseName"].ToString(),
                            GradeLetter = reader["GradeLetter"].ToString()
                        };
                        resultViews.Add(aResultView);
                    }
                    return(resultViews);
                }
        }
Example #13
0
        public ActionResult Edit(Epm_TzProjectPolit model)
        {
            ResultView <int> view = new ResultView <int>();

            string fileDataJson = Request.Form["fileDataJsonFile"];//获取上传图片json字符串


            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                List <DictionaryType> subjectsList = new List <DictionaryType>()
                {
                    DictionaryType.PolitFileType
                };
                var subjects = proxy.GetTypeListByTypes(subjectsList).Data;

                //附件类型
                ViewBag.PolitFileType = subjects[DictionaryType.PolitFileType].ToList().ToSelectList("Name", "No", true);
                if (!string.IsNullOrEmpty(fileDataJson))
                {
                    model.TzAttachs = JsonConvert.DeserializeObject <List <Epm_TzAttachs> >(fileDataJson);//将文件信息json字符
                }


                result = proxy.UpdateTzProjectPolit(model);
            }
            return(Json(result.ToResultView()));
        }
Example #14
0
        public ActionResult UpdateState(long id, string state)
        {
            ResultView <int> view = new ResultView <int>();

            if (string.IsNullOrEmpty(state))
            {
                view.Flag    = false;
                view.Message = "状态不能为空";
                return(Json(view));
            }
            //判断权限
            //if ((ApprovalState)Enum.Parse(typeof(ApprovalState), state) == ApprovalState.ApprSuccess)
            //    Helper.IsCheck(HttpContext, WebModule.Change.ToString(), SystemRight.Check.ToString(), true);
            //else if ((ApprovalState)Enum.Parse(typeof(ApprovalState), state) == ApprovalState.ApprFailure)
            //    Helper.IsCheck(HttpContext, WebModule.Change.ToString(), SystemRight.UnCheck.ToString(), true);
            //else if ((ApprovalState)Enum.Parse(typeof(ApprovalState), state) == ApprovalState.Discarded)
            //    Helper.IsCheck(HttpContext, WebModule.Change.ToString(), SystemRight.Invalid.ToString(), true);

            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateChangeState(id, state);
            }
            return(Json(result.ToResultView()));
        }
Example #15
0
        void RetrieveBiblePassage( )
        {
            ResultView.Hide( );

            BlockerView.Show(delegate
            {
                RequestingBiblePassage = true;

                BibleRenderer.RetrieveBiblePassage(BibleAddress, delegate(string htmlStream)
                {
                    // if it worked, take the html stream and store it
                    if (string.IsNullOrWhiteSpace(htmlStream) == false)
                    {
                        PassageHTML = htmlStream;
                        BibleWebView.LoadHtmlString(PassageHTML, NSBundle.MainBundle.BundleUrl);
                    }
                    else
                    {
                        // otherwise display an error
                        ResultView.Show(GeneralStrings.Network_Status_FailedText,
                                        PrivateControlStylingConfig.Result_Symbol_Failed,
                                        GeneralStrings.Network_Result_FailedText,
                                        GeneralStrings.Retry);
                    }

                    RequestingBiblePassage = false;
                    BlockerView.Hide(null);
                });
            });
        }
        public ActionResult Edit(Epm_AdPutRecord model)
        {
            string fileDataJson = Request.Form["fileDataJsonFile"];                                          //获取上传文件json字符串

            List <Base_Files>   fileList = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符
            Result <int>        result   = new Result <int>();
            ResultView <string> view     = new ResultView <string>();

            if (string.IsNullOrEmpty(model.AdName))
            {
                view.Flag    = false;
                view.Message = "广告名称不能为空";
                return(Json(view));
            }
            if (Convert.ToBoolean(Request.Form["State"]) == true)
            {
                model.State = 1;
            }
            else
            {
                model.State = 0;
            }
            using (BusinessClientProxy proxy = new BusinessClientProxy(ProxyEx(Request)))
            {
                model.EndTime = Convert.ToDateTime(model.EndTime.Value.ToString("yyyy-MM-dd") + " 23:59:59");
                result        = proxy.UpdateAdPutRecord(model, fileList);
            }
            return(Json(result.ToResultView()));
        }
Example #17
0
        public ActionResult Activated(string id)
        {
            ResultView <string> view = new ResultView <string>();

            if (string.IsNullOrWhiteSpace(id))
            {
                view.Flag    = false;
                view.Message = "请选择要激活的设备!";
                return(Json(view));
            }
            long idValue = 0;

            if (!long.TryParse(id, out idValue))
            {
                view.Flag    = false;
                view.Message = "激活设备操作失败!";
                return(Json(view));
            }

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                var result = proxy.ActivatedVideo(idValue);
                return(View(result.ToResultView()));
            }
        }
        void SeriesReady( )
        {
            // only do image work on the main thread
            InvokeOnMainThread(delegate
            {
                ActivityIndicator.Hidden = true;
                ActivityIndicator.RemoveFromSuperview( );

                // if there are now series entries, we're good
                if (RockLaunchData.Instance.Data.NoteDB.SeriesList.Count > 0)
                {
                    // setup each series entry in our table
                    SetupSeriesEntries(RockLaunchData.Instance.Data.NoteDB.SeriesList);

                    // only update the table if we're still visible
                    if (IsVisible == true)
                    {
                        NotesTableView.Hidden = false;
                        NotesTableView.Source = new TableSource(this, SeriesEntries, ImageMainPlaceholder, ImageThumbPlaceholder);
                        NotesTableView.ReloadData( );
                    }
                }
                else if (IsVisible == true)
                {
                    // jhm hack : Show our stupid error message
                    ResultView.Show(MessagesStrings.Series_Error_Title,
                                    PrivateControlStylingConfig.Result_Symbol_Failed,
                                    MessagesStrings.Series_Error_Message + "\n" + RockLaunchData.HackNotesErrorCheck,
                                    GeneralStrings.Retry);
                }
            });
        }
        public ActionResult Add(Msg_MessageTemplete model)
        {
            model.TemplateCon = model.TemplateCon.FilterHtml();
            Result <int>     result = new Result <int>();
            ResultView <int> view   = new ResultView <int>();

            if (string.IsNullOrEmpty(model.TitleCon))
            {
                view.Flag    = false;
                view.Message = "模板标题内容不能为空";
                return(Json(view));
            }
            if (Request.Form["IsEnable"] == EnumState.Enable.ToString())
            {
                model.IsEnable = true;
            }
            else
            {
                model.IsEnable = false;
            }
            if (Request.Form["IsConfirm"] == EnumState.Confirmed.ToString())
            {
                model.IsConfirm = true;
            }
            else
            {
                model.IsConfirm = false;
            }
            using (MessageClientProxy proxy = new MessageClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddMessageTemplete(model);
                view   = result.ToResultView();
            }
            return(Json(view));
        }
        public ActionResult Detail(long id)
        {
            //Result<Epm_TzProjectStartApply> result = new Result<Epm_TzProjectStartApply>();
            //using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            //{
            //    result = proxy.GetTzProjectStartApplyModel(id);
            //    if (result.Flag == EResultFlag.Success && result.Data != null)
            //    {
            //        return View(result.Data);
            //    }
            //    return View();
            //}
            Result <TzStartTenderingAndSupplyView> result = new Result <TzStartTenderingAndSupplyView>();
            ResultView <int> view = new ResultView <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                //根据字典类型集合获取字典数据
                List <DictionaryType> subjectsList = new List <DictionaryType>()
                {
                    DictionaryType.CapitalSource, DictionaryType.TimeAndCrossingsType
                };
                var subjects = proxy.GetTypeListByTypes(subjectsList).Data;

                result = proxy.GetTzProjectStartApplyModelAndOther(id);

                //资金来源
                ViewBag.FundsSourceType      = subjects[DictionaryType.CapitalSource].ToList().ToSelectList("Name", "No", false, result.Data == null ? "" : result.Data.TzProjectStartApply.FundsSourceType);
                ViewBag.timeAndCrossingsType = subjects[DictionaryType.TimeAndCrossingsType].ToList().ToSelectList("Name", "No", true);//附件类型
            }

            return(View(result.Data));
        }
Example #21
0
        //[AuthCheck(Module = WebModule.Bim, Right = SystemRight.Modify)]
        public ActionResult Edit(Epm_Bim model)
        {
            ResultView <int> view = new ResultView <int>();

            //上传模型
            string            fileDataJson = Request.Form["fileDataJsonFile"];                                 //获取上传图片json字符串
            List <Base_Files> fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符

            //表单校验
            //if (string.IsNullOrEmpty(model.Name))
            //{
            //    view.Flag = false;
            //    view.Message = "名称不能为空";
            //    return Json(view);
            //}
            //if (string.IsNullOrEmpty(model.VersionOrder))
            //{
            //    view.Flag = false;
            //    view.Message = "版本号不能为空";
            //    return Json(view);
            //}
            if (fileListFile != null)
            {
                model.BIMState = BIMModelState.BIMLightWeight.ToString();
            }
            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                result = proxy.UpdateBim(model, fileListFile);
            }
            return(Json(result.ToResultView()));
        }
Example #22
0
        public ActionResult UploadRectifyResultZL(Epm_MonitorRectifRecord model)
        {
            ResultView <int> view = new ResultView <int>();

            string statu = Request.Form["State"];

            model.State = int.Parse(statu.ToEnum <RectificationState>().GetValue().ToString());

            List <Base_Files> fileListFile = new List <Base_Files>();
            string            fileDataJson = Request.Form["fileDataJson"];//获取上传图片json字符串

            if (!string.IsNullOrEmpty(fileDataJson))
            {
                fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson);//将文件信息json字符
            }

            //表单校验
            if (string.IsNullOrEmpty(model.Content))
            {
                view.Flag    = false;
                view.Message = "整改内容不能为空";
                return(Json(view));
            }
            Result <int> result = new Result <int>();

            using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request)))
            {
                //result = proxy.AddMonitorRectifRecord(model, fileListFile);
            }
            return(Json(result.ToResultView()));
        }
Example #23
0
        void JoinClicked(PlatformButton button)
        {
            if (ValidateInput( ))
            {
                //hack - Can't figure out WHY the join button isn't in the proper Z order on the Nexus 7.
                // but I just don't care right now. So hide it and unhide it.
                JoinButton.Hidden = true;
                EnableControls(false);

                BlockerView.Show( );

                MobileAppApi.JoinGroup(GroupID, FirstName.Text, LastName.Text, SpouseName.Text, Email.Text, CellPhone.Text.AsNumeric( ),
                                       delegate(System.Net.HttpStatusCode statusCode, string statusDescription)
                {
                    BlockerView.Hide( );

                    if (Rock.Mobile.Network.Util.StatusInSuccessRange(statusCode) == true)
                    {
                        ResultView.Show(RegisterStrings.RegisterStatus_Success,
                                        PrivateControlStylingConfig.Result_Symbol_Success,
                                        string.Format(ConnectStrings.JoinGroup_RegisterSuccess, GroupTitle.Text),
                                        GeneralStrings.Done);
                    }
                    else
                    {
                        ResultView.Show(RegisterStrings.RegisterStatus_Failed,
                                        PrivateControlStylingConfig.Result_Symbol_Failed,
                                        ConnectStrings.JoinGroup_RegisterFailed,
                                        GeneralStrings.Done);
                    }
                });
            }
        }
        public ActionResult Add(Base_TypeDictionary model)
        {
            ResultView <int> view = new ResultView <int>();

            //表单验证
            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.No))
            {
                view.Flag    = false;
                view.Message = "编号不能为空";
                return(Json(view));
            }
            Result <int> result = new Result <int>();

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddType(model);
            }
            return(Json(result.ToResultView()));
        }
        public IActionResult ScanWithCode(string code)
        {
            var model = new ResultView
            {
                Code           = code,
                ScanSuccessful = true
            };

            var product = ProductService.GetProduct(code);

            if (product == null)
            {
                var apiObj = new FoodFactsAPI(code);

                if (apiObj.CallAPI())
                {
                    model.LoadProductSuccessful = apiObj.LoadSuccessful;
                    model.ProductView           = ProductService.CreateAndGetProduct(apiObj.Product);
                }
            }
            else
            {
                model.LoadProductSuccessful = true;
                model.ProductView           = product;
            }

            model.ItemStoreSelect = model.ProductView == null ? new ItemStoreSelect() : new ItemStoreSelect(
                model.ProductView.ProductID,
                WarehouseService.GetLocations(UserID)
                );

            return(PartialView("ScanResult", model));
        }
Example #26
0
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);

            // reset the background colors
            UserNameText.Background.BackgroundColor        = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);
            PasswordText.Background.BackgroundColor        = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);
            ConfirmPasswordText.Background.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);

            NickNameText.Background.BackgroundColor  = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);
            LastNameText.Background.BackgroundColor  = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);
            EmailText.Background.BackgroundColor     = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);
            CellPhoneText.Background.BackgroundColor = Rock.Mobile.UI.Util.GetUIColor(ControlStylingConfig.BG_Layer_Color);

            ScrollView.ContentOffset = CGPoint.Empty;

            // set values
            UserNameText.Field.Text = string.Empty;

            PasswordText.Field.Text        = string.Empty;
            ConfirmPasswordText.Field.Text = string.Empty;

            NickNameText.Field.Text = string.Empty;
            LastNameText.Field.Text = string.Empty;

            EmailText.Field.Text = string.Empty;

            // setup the phone number
            CellPhoneText.Field.Delegate = new Rock.Mobile.PlatformSpecific.iOS.UI.PhoneNumberFormatterDelegate();
            CellPhoneText.Field.Text     = string.Empty;
            CellPhoneText.Field.Delegate.ShouldChangeCharacters(CellPhoneText.Field, new NSRange(CellPhoneText.Field.Text.Length, 0), "");

            State = RegisterState.None;
            ResultView.Hide( );
        }
        public ActionResult Add(Base_Settings model)
        {
            ResultView <int> view = new ResultView <int>();

            if (string.IsNullOrEmpty(model.Code))
            {
                view.Flag    = false;
                view.Message = "编码不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Name))
            {
                view.Flag    = false;
                view.Message = "名称不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Value))
            {
                view.Flag    = false;
                view.Message = "值不能为空";
                return(Json(view));
            }

            Result <int> result = new Result <int>();

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                result = proxy.AddSettings(model);
            }
            return(Json(result.ToResultView()));
        }
Example #28
0
        void Start()
        {
            //积分器初始化
            m_scoreRecorder = new ScoreRecorder();

            //获取小鸟控制器
            m_birdController = FindObjectOfType <BirdController>();

            //声音控制器
            m_audioManager = new AudioManager();
            m_audioManager.PlayBGMusic();

            m_gameBehaviours = new List <IGameBehaviour>();
            m_gameBehaviours.Add(m_audioManager);

            //UI初始化
            m_topView = new TopView();
            m_topView.InitPreLoadView();
            m_resultView = new ResultView();
            m_resultView.InitPreLoadView();


            //画布管理器
            bgSkyBehaviours = this.gameObject.AddComponent <BGSkyBehaviours>();
            m_pipesFactory  = new PipesFactory();
            //先创建一组管子
            m_pipesFactory.CreatePipeGroup();
        }
Example #29
0
        public override void OnConfigurationChanged(Android.Content.Res.Configuration newConfig)
        {
            base.OnConfigurationChanged(newConfig);

            ProgressBarBlocker.LayoutParameters.Width = NavbarFragment.GetFullDisplayWidth( );
            ResultView.SetBounds(new System.Drawing.RectangleF(0, 0, NavbarFragment.GetFullDisplayWidth( ), this.Resources.DisplayMetrics.HeightPixels));
        }
        public ActionResult Edit(Epm_OilStation model)
        {
            //权限检查
            Helper.IsCheck(HttpContext, AdminModule.AdminOrganization.ToString(), SystemRight.Modify.ToString(), true);

            Result <int>        result = new Result <int>();
            ResultView <string> view   = new ResultView <string>();

            if (string.IsNullOrEmpty(model.Code1))
            {
                view.Flag    = false;
                view.Message = "单位编码不能为空";
                return(Json(view));
            }
            if (string.IsNullOrEmpty(model.Code))
            {
                view.Flag    = false;
                view.Message = "编号不能为空";
                return(Json(view));
            }

            Result <Epm_OilStation> OilStationResult = new Result <Epm_OilStation>();

            using (AdminClientProxy proxy = new AdminClientProxy(ProxyEx(Request)))
            {
                OilStationResult                  = proxy.GetOilStation(model.Id);
                OilStationResult.Data.Code        = model.Code;
                OilStationResult.Data.Code1       = model.Code1;
                OilStationResult.Data.Name        = model.Name;
                OilStationResult.Data.Description = model.Description;
                OilStationResult.Data.Address     = model.Address;
                result = proxy.UpdateOilStation(model);
            }
            return(Json(result.ToResultView()));
        }
Example #31
0
 public ResultController(MainController mainController)
 {
     this.mainController = mainController;
     this.resultView = mainController.resultView;
     this.mainView = mainController.mainView;
     this.dataView = resultView.dataView;
     this.connection = mainController.dbConnection.connection;
     checkedItems = new List<int>();
 }
Example #32
0
        /// <summary>
        /// All the variables are initialized here.
        /// </summary>
        private void Initialize()
        {
            //Other
            this.resultModelList = new List<ResultModel>();
            this.resultList = new ArrayList();

            //Model
            dbConnection = new ConnectionModel();

            //View
            this.mainForm = new MainForm();
            this.mainView = new MainView(this);
            this.adminLoginView = new AdminLoginView();
            this.inleesView = new InleesView(this);
            this.resultView = new ResultView(this);
            this.loadMapView = new LoadMapView(this);
            this.statisticView = new StatisticView(this);

            //Controller
            this.mainViewController = new MainViewController(this);
            this.inleesViewController = new InleesViewController(this);
            this.resultController = new ResultController(this);
            this.resultDialogController = new ResultDialogController(this);
            this.colonyController = new ColonyController();
            this.fileSelectController = new FileController(this);
            this.statisticController = new StatisticController(this);

            // ADD INLEESVIEW AND RESULTVIEW TO MAINVIEW
            this.mainViewController.AddToPage(inleesView, 0);
            this.mainViewController.AddToPage(resultView, 1);
            this.mainViewController.AddToPage(statisticView, 2);
            this.mainForm.Controls.Add(mainView);
            this.mainView.Dock = DockStyle.Fill;
            this.resultView.Dock = DockStyle.Fill;
            this.statisticView.Dock = DockStyle.Fill;

            // START APP
            Application.EnableVisualStyles();
            Application.Run(mainForm);
        }