Пример #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            //InsertMode();

            if (FileSign.FileName != "")
            {
                if (Path.GetExtension(FileSign.FileName) != ".png")
                {
                    this.MasterSite.ModelError.ShowMessageError = Resources.errorReg_OIC_001;
                    this.MasterSite.ModelError.ShowModalError();
                    return;
                    //UCModalError.ShowMessageError = Resources.errorReg_OIC_001;
                    //UCModalError.ShowModalError();
                    //return;
                }
            }

            using (BLL.PersonBiz biz = new BLL.PersonBiz()){
                var res = biz.UpdateOIC(UserProfile.Id, txtOICUserName.Text, ddlAntecedent.SelectedValue,
                                        txtFirstName.Text, txtLastName.Text, rblSex.SelectedValue, UserProfile.MemberType.ToString(), FileSign.FileBytes);

                if (res.IsError)
                {
                    this.MasterSite.ModelError.ShowMessageError = res.ErrorMsg;
                    this.MasterSite.ModelError.ShowModalError();
                    //UCModalError.ShowMessageError = res.ErrorMsg;
                    //UCModalError.ShowModalError();
                }
                else
                {
                    this.MasterSite.ModelSuccess.ShowMessageSuccess = SysMessage.SuccessEditTypeOIC;
                    this.MasterSite.ModelSuccess.ShowModalSuccess();
                    //UCModalSuccess.ShowMessageSuccess = SysMessage.SuccessEditTypeOIC;
                    //UCModalSuccess.ShowModalSuccess();
                }
            }
        }