Exemplo n.º 1
0
        public void EditPersonal(DTO.MemberType memberType, DTO.PersonTemp personal)
        {
            var    biz = new BLL.PersonBiz();
            String res = ucAttachFileControl1.ValidDocRequire();

            if (String.IsNullOrEmpty(res))
            {
                var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray());
                if ((final.IsError) || (final.ResultMessage == false))
                {
                    UCModalError.ShowMessageError = final.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else if (final.ResultMessage == true)
                {
                    UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                    UCModalSuccess.ShowModalSuccess();
                    btnClose.Visible  = true;
                    btnCancel.Visible = false;
                    btnOk.Visible     = false;
                    //Response.Redirect("~/BankPage.aspx");
                }
            }
            else
            {
                ModelError.ShowMessageError = res;
                ModelError.ShowModalError();
            }
        }
Exemplo n.º 2
0
        //View Mode
        public DTO.Person GetPersonal()
        {
            BLL.PersonBiz regBiz = new BLL.PersonBiz();
            var           res    = regBiz.GetById(UserProfile.Id);

            if (res.IsError)
            {
                ModelError.ShowMessageError = res.ErrorMsg;
                ModelError.ShowModalError();
            }
            this.PersonId = res.DataResponse.ID;
            return(res.DataResponse);
        }
Exemplo n.º 3
0
        //Edit Mode
        public DTO.PersonTemp GetPersonTemp()
        {
            BLL.PersonBiz regBiz = new BLL.PersonBiz();
            var           res    = regBiz.GetPersonTemp(UserProfile.Id);

            if (res.IsError)
            {
                ModelError.ShowMessageError = res.ErrorMsg;
                ModelError.ShowModalError();
            }
            this.PersonId = res.DataResponse.ID;
            //Assign CreateDate
            this.CreateDateTemp = res.DataResponse.CREATED_DATE;
            return(res.DataResponse);
        }
Exemplo n.º 4
0
        public void EditCompany(DTO.MemberType memberType, DTO.PersonTemp personal)
        {
            //var biz = new BLL.PersonBiz();
            //DTO.ResponseMessage<bool> res =  ucAttachFileControl1.DocRequire();
            //if (res.ResultMessage == true)
            //{
            //    var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray());

            //    if (final.IsError)
            //    {
            //        UCModalError.ShowMessageError = final.ErrorMsg;
            //        UCModalError.ShowModalError();

            //    }
            //}
            //else if ((res.ResultMessage == false) || (res.IsError))
            //{
            //    ModelError.ShowMessageError = SysMessage.FileRequire + res.ErrorMsg;
            //    ModelError.ShowModalError();
            //}
            var    biz = new BLL.PersonBiz();
            String res = ucAttachFileControl1.ValidDocRequire();

            if (String.IsNullOrEmpty(res))
            {
                var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray());
                if ((final.IsError) || (final.ResultMessage == false))
                {
                    UCModalError.ShowMessageError = final.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else if (final.ResultMessage == true)
                {
                    UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                    UCModalSuccess.ShowModalSuccess();
                    btnClose.Visible  = true;
                    btnCancel.Visible = false;
                    btnOk.Visible     = false;
                }
            }
            else
            {
                ModelError.ShowMessageError = res;
                ModelError.ShowModalError();
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Control Validate Before Edit
        /// If CurPage = "1" is GeneralMemberType must to validate birthday before submit
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOk_Click(object sender, EventArgs e)
        {
            //General BirthDay Validation
            //CurrentPage Check
            if ((this.CurPage != null) && (this.CurPage != ""))
            {
                //PersonGeneral
                if (this.CurPage.Equals("1"))
                {
                    //Control Validation
                    //DTO.ResponseMessage<bool> res = this.ControlValidationBeforeSubmit(this.Page);
                    DTO.ResponseMessage <bool> resBirthDay = this.DateValidation(PersonGeneral.TextboxBirthDay.Text);
                    if ((resBirthDay.ResultMessage == false) || (resBirthDay.IsError))
                    {
                        ModelError.ShowMessageError = resBirthDay.ErrorMsg;
                        ModelError.ShowModalError();
                        return;
                    }
                }

                //Control Validation
                DTO.ResponseMessage <bool> res = this.ControlValidationBeforeSubmit(this.Page);
                if (res.ResultMessage == true)
                {
                    if (OkRegister_Click != null)
                    {
                        OkRegister_Click(sender, e);
                    }
                }
                if ((res.ResultMessage == false) || (res.IsError))
                {
                    ModelError.ShowMessageError = res.ErrorMsg;
                    ModelError.ShowModalError();
                    return;
                }
            }

            //PnlAddButton.Visible = false;
        }