Ejemplo n.º 1
0
		public DeleteDocument(IServer server, IEventAggregator events, ShowMessageBox showMessageBox)
		{
			this.server = server;
			this.events = events;
			this.showMessageBox = showMessageBox;
		}
Ejemplo n.º 2
0
        /// <summary>
        /// This will read the response text from server side.
        /// </summary>
        /// <param name="asyncResult"></param>
        private void OnEndGetRequestStream(IAsyncResult asyncResult)
        {
            HttpWebRequest httpWebRequest = asyncResult.AsyncState as HttpWebRequest;
            ShowMessageBox invoker = new ShowMessageBox(ShowServerResponse);

            try
            {
                HttpWebResponse webResponse = httpWebRequest.EndGetResponse(asyncResult) as HttpWebResponse;
                using (Stream stream = webResponse.GetResponseStream())
                {
                    StreamReader reader = new StreamReader(stream);
                    this.Dispatcher.BeginInvoke(invoker, reader.ReadToEnd());
                }
            }
            // Catch any server side error
            catch (WebException ex)
            {
                HttpWebResponse webResponse = ex.Response as HttpWebResponse;
                int statusCode = (int)webResponse.StatusCode;
                
                // If the status code is not OK
                if (statusCode != 200)
                {
                    // Display the server response error text here.
                    using (Stream stream = webResponse.GetResponseStream())
                    {
                        StreamReader reader = new StreamReader(stream);
                        this.Dispatcher.BeginInvoke(invoker, reader.ReadToEnd());
                    }
                }
            }
        }
Ejemplo n.º 3
0
		public EditDocumentById(IEventAggregator events, IServer server, ShowMessageBox showMessageBox)
		{
			this.events = events;
			this.server = server;
		    this.showMessageBox = showMessageBox;
		}
Ejemplo n.º 4
0
 public EditDocumentById(IEventAggregator events, IServer server, ShowMessageBox showMessageBox)
 {
     this.events         = events;
     this.server         = server;
     this.showMessageBox = showMessageBox;
 }
Ejemplo n.º 5
0
    protected void save_Click(object sender, EventArgs e)
    {
        outDeptExamBLL                          = new OutDeptExamBLL();
        outDeptExamModel                        = new OutDeptExamModel();
        outDeptExamModel.id                     = Guid.NewGuid().ToString();
        outDeptExamModel.students_name          = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(students_name.Value));
        outDeptExamModel.students_real_name     = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(students_real_name.Text));
        outDeptExamModel.training_base_code     = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(training_base_code.Value));
        outDeptExamModel.training_base_name     = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(training_base_name.Value));
        outDeptExamModel.sex                    = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(sex.Text));
        outDeptExamModel.high_education         = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(high_education.Text));
        outDeptExamModel.high_education_time    = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(high_education_time.Text));
        outDeptExamModel.professional_base_code = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(professional_base_code.Value));
        outDeptExamModel.professional_base_name = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(professional_base_name.Text));
        outDeptExamModel.rotary_dept_code       = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(rotary_dept_code.Value));
        outDeptExamModel.rotary_dept_name       = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(rotary_dept_name.Text));
        outDeptExamModel.rotary_begin_time      = CommonFunc.SafeGetDateTimeStringFromObjectByFormat(CommonFunc.FilterSpecialString(rotary_begin_time.Text), "yyyy-MM-dd");
        outDeptExamModel.rotary_end_time        = CommonFunc.SafeGetDateTimeStringFromObjectByFormat(CommonFunc.FilterSpecialString(rotary_end_time.Text), "yyyy-MM-dd");
        outDeptExamModel.instructor             = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(instructor.Text));
        outDeptExamModel.instructor_tag         = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(instructor_tag.Value));
        outDeptExamModel.kqqk                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(kqqk.Text));
        outDeptExamModel.gztd                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(gztd.Text));
        outDeptExamModel.ydyf                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(ydyf.Text));
        outDeptExamModel.llsp                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(llsp.Text));
        outDeptExamModel.zdzx                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(zdzx.Text));
        outDeptExamModel.blsx                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(blsx.Text));
        outDeptExamModel.clbrnl                 = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(clbrnl.Text));
        outDeptExamModel.sjcznl                 = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(sjcznl.Text));
        outDeptExamModel.czjn                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(czjn.Text));
        outDeptExamModel.zdsp                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(zdsp.Text));
        outDeptExamModel.djnl                   = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(djnl.Text));
        outDeptExamModel.total_score            = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(totalscore.Text));
        outDeptExamModel.instructor_date        = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(teacher_time.Text));
        outDeptExamModel.dept_manager           = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(kzr.Text));
        outDeptExamModel.dept_manager_date      = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(kzr_time.Text));
        outDeptExamModel.is_pass                = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(ispass.SelectedItem.Value));

        //Response.Write("<script> alert('"+totalscore.Text+"');</script>");
        if (string.IsNullOrEmpty(outDeptExamModel.total_score))
        {
            ShowMessageBox.Showmessagebox(this, "合计得分不能为空", null);
            return;
        }
        if (string.IsNullOrEmpty(outDeptExamModel.is_pass))
        {
            ShowMessageBox.Showmessagebox(this, "考核结果不能为空", null);
            return;
        }

        if (string.IsNullOrEmpty(outDeptExamModel.dept_manager))
        {
            ShowMessageBox.Showmessagebox(this, "科主任不能为空", null);
            return;
        }
        if (outDeptExamModel.is_pass == "同意出科")
        {
            status = "1";
        }
        else
        {
            status = "2";
            //StudentsRotaryInformation2BLL bll = new StudentsRotaryInformation2BLL();
            //StudentsRotaryInformation2Model model = new StudentsRotaryInformation2Model();
            //model = bll.GetModelById(id);

            //model.Id = Guid.NewGuid().ToString();
            //model.OutdeptStatus = "0";
            //model.OutdeptApplication = "0";
            //model.QuestionnaireStatus = "0";
            //model.Tag1 = "0";

            //bll.AddOne(model);
        }
        if (outDeptExamBLL.Insert(outDeptExamModel) && new StudentsRotaryInformation2BLL().UpdateOutdeptStatusByT(status, id))
        {
            try
            {
                Response.Write("<script language='javascript'> alert('出科考核表提交成功');window.opener.window.loadPageList('" + pi + "');window.close();</script>");
                Response.End();
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
    }
Ejemplo n.º 6
0
    protected void save_Click(object sender, EventArgs e)
    {

        questionnaireModel = new QuestionnaireModel();
        questionnaireBLL = new QuestionnaireBLL();
        studentsRotaryInformation2BLL = new StudentsRotaryInformation2BLL();
        questionnaireModel.id = Guid.NewGuid().ToString();
        questionnaireModel.training_base_name = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(training_base_name.Text.Trim()));
        questionnaireModel.training_base_code = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(training_base_code.Value.Trim()));
        questionnaireModel.professional_base_name = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(professional_base_name.Text.Trim()));
        questionnaireModel.professional_base_code = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(professional_base_code.Value.Trim()));
        questionnaireModel.rotary_dept_name = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(rotary_dept_name.Text.Trim()));
        questionnaireModel.rotary_dept_code = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(rotary_dept_code.Value.Trim()));
        questionnaireModel.instructor = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(instructor.Text.Trim()));
        questionnaireModel.one = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList1.SelectedValue));
        questionnaireModel.two = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList2.SelectedValue));
        questionnaireModel.three = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList3.SelectedValue));
        questionnaireModel.four = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList4.SelectedValue));
        questionnaireModel.five = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList5.SelectedValue));
        questionnaireModel.six = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList6.SelectedValue));
        questionnaireModel.seven = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList7.SelectedValue));
        questionnaireModel.eight = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList8.SelectedValue));
        questionnaireModel.nine = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList9.SelectedValue));
        questionnaireModel.ten = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList10.SelectedValue));
        questionnaireModel.eleven = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList11.SelectedValue));
        questionnaireModel.twelve = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList12.SelectedValue));
        questionnaireModel.thirteen = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(RadioButtonList13.SelectedValue));
        questionnaireModel.advice = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(advice.Text.Trim()));
        questionnaireModel.register_date = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(register_date.Text.Trim()));
        questionnaireModel.writor = CommonFunc.FilterSpecialString(CommonFunc.SafeGetStringFromObj(writor.Value.Trim()));
        if (RadioButtonList1.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第一项未选择", null);
            return;
        }
        if (RadioButtonList2.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第二项未选择", null);
            return;
        }
        if (RadioButtonList3.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第三项未选择", null);
            return;
        }
        if (RadioButtonList4.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第四项未选择", null);
            return;
        }
        if (RadioButtonList5.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第五项未选择", null);
            return;
        }
        if (RadioButtonList6.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第六项未选择", null);
            return;
        }
        if (RadioButtonList7.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第七项未选择", null);
            return;
        }
        if (RadioButtonList8.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第八项未选择", null);
            return;
        }
        if (RadioButtonList9.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第九项未选择", null);
            return;
        }
        if (RadioButtonList10.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第十项未选择", null);
            return;
        }
        if (RadioButtonList11.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第十一项未选择", null);
            return;
        }
        if (RadioButtonList12.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第十二项未选择", null);
            return;
        }
        if (RadioButtonList13.SelectedItem == null)
        {
            ShowMessageBox.Showmessagebox(this, "第十三项未选择", null);
            return;
        }
        if (string.IsNullOrEmpty(questionnaireModel.advice))
        {
            ShowMessageBox.Showmessagebox(this, "第十四项不能为空", null);
            return;
        }
        if (questionnaireBLL.InsertQuestionnaire(questionnaireModel) && studentsRotaryInformation2BLL.UpdateQuestStatus("1", Id))
        {
            try
            {

                Response.Write("<script language='javascript'> alert('问卷调查提交成功');window.opener.window.loadRotaryInfo('" + Name + "','"+TrainingBaseCode+"');window.close();</script>");
                return;
            }
            catch (Exception ex)
            {

                Response.Write(ex.Message);
            }

        }
    }
Ejemplo n.º 7
0
    protected void save_Click(object sender, EventArgs e)
    {
        int  count = 0;
        bool tag   = false;

        studentsPersonalInformationModel = new StudentsPersonalInformationModel();
        studentsPersonalInformationBLL   = new StudentsPersonalInformationBLL();

        studentsPersonalInformationModel.real_name = CommonFunc.FilterSpecialString(real_name.Text.Trim());

        studentsPersonalInformationModel.sex       = CommonFunc.FilterSpecialString(sex.SelectedValue.Trim());
        studentsPersonalInformationModel.age       = CommonFunc.FilterSpecialString(age.Text.Trim());
        studentsPersonalInformationModel.datebirth = CommonFunc.FilterSpecialString(datebirth.Text.Trim());
        studentsPersonalInformationModel.minzu     = CommonFunc.FilterSpecialString(minzu.SelectedValue.Trim());

        studentsPersonalInformationModel.province = CommonFunc.FilterSpecialString(province_name.Value.Trim());
        studentsPersonalInformationModel.city     = CommonFunc.FilterSpecialString(city_name.Value.Trim());
        studentsPersonalInformationModel.area     = CommonFunc.FilterSpecialString(area_name.Value.Trim());

        studentsPersonalInformationModel.province_code = CommonFunc.FilterSpecialString(province_code.Value.Trim());
        studentsPersonalInformationModel.city_code     = CommonFunc.FilterSpecialString(city_code.Value.Trim());
        studentsPersonalInformationModel.area_code     = CommonFunc.FilterSpecialString(area_code.Value.Trim());


        studentsPersonalInformationModel.detail_address              = CommonFunc.FilterSpecialString(detail_address.Text.Trim());
        studentsPersonalInformationModel.id_number                   = CommonFunc.FilterSpecialString(id_number.Text.Trim());
        studentsPersonalInformationModel.telephon                    = CommonFunc.FilterSpecialString(telephon.Text.Trim());
        studentsPersonalInformationModel.mail                        = CommonFunc.FilterSpecialString(mail.Text.Trim());
        studentsPersonalInformationModel.bk_school                   = CommonFunc.FilterSpecialString(bk_school.Text.Trim());
        studentsPersonalInformationModel.bk_major                    = CommonFunc.FilterSpecialString(bk_major.Text.Trim());
        studentsPersonalInformationModel.graduation_time             = CommonFunc.SafeGetDateTimeStringFromObjectByFormat(CommonFunc.FilterSpecialString(graduation_time.Text.Trim()), "yyyy-MM");
        studentsPersonalInformationModel.high_education              = CommonFunc.FilterSpecialString(high_education.Text.Trim());
        studentsPersonalInformationModel.high_school                 = CommonFunc.FilterSpecialString(high_school.Text.Trim());
        studentsPersonalInformationModel.high_major                  = CommonFunc.FilterSpecialString(high_major.Text.Trim());
        studentsPersonalInformationModel.high_education_time         = CommonFunc.SafeGetDateTimeStringFromObjectByFormat(CommonFunc.FilterSpecialString(high_education_time.Text.Trim()), "yyyy-MM");
        studentsPersonalInformationModel.identity_type               = CommonFunc.FilterSpecialString(identity_type.SelectedValue.Trim());
        studentsPersonalInformationModel.send_unit                   = CommonFunc.FilterSpecialString(send_unit.Text.Trim());
        studentsPersonalInformationModel.training_base_province_code = CommonFunc.FilterSpecialString(training_base_province_code.Value.Trim());
        studentsPersonalInformationModel.training_base_province_name = CommonFunc.FilterSpecialString(training_base_province_name.Value.Trim());
        studentsPersonalInformationModel.training_base_code          = CommonFunc.FilterSpecialString(training_base_code.Value.Trim());
        studentsPersonalInformationModel.training_base_name          = CommonFunc.FilterSpecialString(training_base_name.Value.Trim());
        studentsPersonalInformationModel.collaborative_unit          = CommonFunc.FilterSpecialString(collaborative_unit.Text.Trim());
        studentsPersonalInformationModel.professional_base_code      = CommonFunc.FilterSpecialString(professional_base_code.Value.Trim());
        studentsPersonalInformationModel.professional_base_name      = CommonFunc.FilterSpecialString(professional_base_name.Value.Trim());
        studentsPersonalInformationModel.training_time               = CommonFunc.FilterSpecialString(training_time.Text.Trim());
        studentsPersonalInformationModel.plan_training_time          = CommonFunc.FilterSpecialString(plan_training_time.Text.Trim());
        studentsPersonalInformationModel.writor                      = CommonFunc.FilterSpecialString(writor.Text.Trim());
        studentsPersonalInformationModel.register_date               = CommonFunc.FilterSpecialString(register_date.Text.Trim());

        studentsPersonalInformationModel.urgent          = CommonFunc.FilterSpecialString(urgent.Text.Trim());
        studentsPersonalInformationModel.urgent_telephon = CommonFunc.FilterSpecialString(urgent_telephon.Text.Trim());
        studentsPersonalInformationModel.image_path      = CommonFunc.FilterSpecialString(image_path.Value.Trim());

        if (string.IsNullOrEmpty(id))
        {
            studentsPersonalInformationModel.id   = Guid.NewGuid().ToString();
            studentsPersonalInformationModel.name = na.ToString();

            if (string.IsNullOrEmpty(studentsPersonalInformationModel.id_number))
            {
                ShowMessageBox.Showmessagebox(this, "居民身份证号码不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.detail_address))
            {
                ShowMessageBox.Showmessagebox(this, "家庭详细地址不能为空", null);
                return;
            }
            if (studentsPersonalInformationModel.detail_address.Length > 70)
            {
                ShowMessageBox.Showmessagebox(this, "家庭常住地址不能大于70个字符", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.sex))
            {
                ShowMessageBox.Showmessagebox(this, "性别不能为空", null);
                return;
            }


            if (string.IsNullOrEmpty(studentsPersonalInformationModel.telephon))
            {
                ShowMessageBox.Showmessagebox(this, "常用手机号码不能为空", null);
                return;
            }
            if (!ValidityCheck.PhoneNumIsValid(studentsPersonalInformationModel.telephon, this))
            {
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.mail))
            {
                ShowMessageBox.Showmessagebox(this, "常用邮箱不能为空", null);
                return;
            }
            if (!ValidityCheck.EmailIsValid(studentsPersonalInformationModel.mail, this))
            {
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.high_school))
            {
                ShowMessageBox.Showmessagebox(this, "最高学历毕业院校不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.high_major))
            {
                ShowMessageBox.Showmessagebox(this, "最高学历专业不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.high_education_time))
            {
                ShowMessageBox.Showmessagebox(this, "获得最高学历时间不能为空", null);
                return;
            }

            if (studentsPersonalInformationModel.identity_type == "单位人")
            {
                if (string.IsNullOrEmpty(studentsPersonalInformationModel.send_unit))
                {
                    ShowMessageBox.Showmessagebox(this, "派出单位不能为空", null);
                }
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.training_base_name))
            {
                ShowMessageBox.Showmessagebox(this, "培训基地不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.professional_base_name))
            {
                ShowMessageBox.Showmessagebox(this, "培训专业不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.training_time))
            {
                ShowMessageBox.Showmessagebox(this, "参训时间不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.plan_training_time))
            {
                ShowMessageBox.Showmessagebox(this, "计划参训时间不能为空", null);
                return;
            }

            count = studentsPersonalInformationBLL.InsertStudentsPersonalInformation(studentsPersonalInformationModel);

            if (count > 0)
            {
                try
                {
                    Response.Write("<script language='javascript'> alert('个人信息添加成功');window.opener.parent.frames.bodyFrame.frames.frmright.window.loadPageList(1);window.close();</script>");
                    Response.End();
                }
                catch (Exception ex)
                {
                    Response.Write(ex.Message);
                }
            }
        }
        else
        {
            studentsPersonalInformationModel.id = id;

            if (string.IsNullOrEmpty(studentsPersonalInformationModel.id_number))
            {
                ShowMessageBox.Showmessagebox(this, "居民身份证号码不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.detail_address))
            {
                ShowMessageBox.Showmessagebox(this, "家庭详细地址不能为空", null);
                return;
            }
            if (studentsPersonalInformationModel.detail_address.Length > 70)
            {
                ShowMessageBox.Showmessagebox(this, "家庭常住地址不能大于70个字符", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.sex))
            {
                ShowMessageBox.Showmessagebox(this, "性别不能为空", null);
                return;
            }


            if (string.IsNullOrEmpty(studentsPersonalInformationModel.telephon))
            {
                ShowMessageBox.Showmessagebox(this, "常用手机号码不能为空", null);
                return;
            }
            if (!ValidityCheck.PhoneNumIsValid(studentsPersonalInformationModel.telephon, this))
            {
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.mail))
            {
                ShowMessageBox.Showmessagebox(this, "常用邮箱不能为空", null);
                return;
            }
            if (!ValidityCheck.EmailIsValid(studentsPersonalInformationModel.mail, this))
            {
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.high_school))
            {
                ShowMessageBox.Showmessagebox(this, "最高学历毕业院校不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.high_major))
            {
                ShowMessageBox.Showmessagebox(this, "最高学历专业不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.high_education_time))
            {
                ShowMessageBox.Showmessagebox(this, "获得最高学历时间不能为空", null);
                return;
            }

            if (studentsPersonalInformationModel.identity_type == "单位人")
            {
                if (string.IsNullOrEmpty(studentsPersonalInformationModel.send_unit))
                {
                    ShowMessageBox.Showmessagebox(this, "派出单位不能为空", null);
                }
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.training_base_name))
            {
                ShowMessageBox.Showmessagebox(this, "培训基地不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.professional_base_name))
            {
                ShowMessageBox.Showmessagebox(this, "培训专业不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.training_time))
            {
                ShowMessageBox.Showmessagebox(this, "参训时间不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(studentsPersonalInformationModel.plan_training_time))
            {
                ShowMessageBox.Showmessagebox(this, "计划参训时间不能为空", null);
                return;
            }

            tag = studentsPersonalInformationBLL.UpdateStudentsPersonalInformation(studentsPersonalInformationModel);
            if (tag)
            {
                try
                {
                    Response.Write("<script> alert('个人信息修改成功');window.opener.window.loadPageList('" + pi + "');window.close();</script>");
                    Response.End();
                }
                catch (Exception ex)
                {
                    Response.Write(ex.Message);
                }
            }
            else
            {
                Response.Write("<script> alert('个人信息修改失败');</script>");
                Response.End();
            }
        }
    }
        /// <summary>
        /// 确定按钮操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (m_EditType == 1)
            {
                #region 添加操作

                try
                {
                    HK_Commodity hK_Commodity = new HK_Commodity();

                    if (!string.IsNullOrEmpty(this.txtHKCommodityCode.Text))
                    {
                        if (!HKManageCommon.IsExistHKCommodityCode(this.txtHKCommodityCode.Text))
                        {
                            ShowMessageBox.ShowInformation("代码已经存在!");
                            return;
                        }
                        if (InputTest.zeroStartIntTest(this.txtHKCommodityCode.Text))
                        {
                            if (this.txtHKCommodityCode.Text.Length == 5)
                            {
                                hK_Commodity.HKCommodityCode = this.txtHKCommodityCode.Text;
                            }
                            else
                            {
                                ShowMessageBox.ShowInformation("港股代码是五位数!");
                                return;
                            }
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("请输入数字!");
                            return;
                        }
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("请填写代码!");
                        return;
                    }
                    if (!string.IsNullOrEmpty(this.txtHKCommodityName.Text))
                    {
                        if (!HKManageCommon.IsExistHKCommodityName(this.txtHKCommodityName.Text))
                        {
                            ShowMessageBox.ShowInformation("代码名称已经存在!");
                            return;
                        }
                        hK_Commodity.HKCommodityName = this.txtHKCommodityName.Text;
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("请填写代码名称!");
                        return;
                    }

                    if (!string.IsNullOrEmpty(this.txtStockPinYin.Text))
                    {
                        hK_Commodity.StockPinYin = this.txtStockPinYin.Text;
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("拼音简称不能为空!");
                        return;
                    }

                    if (!string.IsNullOrEmpty(this.cmbBreedClassID.Text))
                    {
                        hK_Commodity.BreedClassID = ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex;
                    }
                    else
                    {
                        //cM_Commodity.BreedClassID = AppGlobalVariable.INIT_INT;
                        ShowMessageBox.ShowInformation("请选择品种类型!");
                        return;
                    }
                    if (!string.IsNullOrEmpty(this.dtMarketDate.Text))
                    {
                        hK_Commodity.MarketDate = Convert.ToDateTime(this.dtMarketDate.Text);
                    }
                    else
                    {
                        //cM_Commodity.MarketDate = AppGlobalVariable.INIT_DATETIME;
                        ShowMessageBox.ShowInformation("请选择上市日期!");
                        return;
                    }

                    if (!string.IsNullOrEmpty(this.txtturnovervolume.Text))
                    {
                        if (InputTest.intTest(this.txtturnovervolume.Text))
                        {
                            hK_Commodity.turnovervolume = Convert.ToDouble(this.txtturnovervolume.Text);
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("请输入正整数!");
                            return;
                        }
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("流通股数不能为空!");
                        return;
                    }
                    if (!string.IsNullOrEmpty(this.txtPerHandThighOrShare.Text))
                    {
                        if (InputTest.intTest(this.txtPerHandThighOrShare.Text))
                        {
                            hK_Commodity.PerHandThighOrShare = Convert.ToInt32(this.txtPerHandThighOrShare.Text);
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("请输入正整数!");
                            return;
                        }
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("每手股数不能为空!");
                        return;
                    }
                    hK_Commodity.ISSysDefaultCode = (int)GTA.VTS.Common.CommonObject.Types.IsYesOrNo.No;
                    //用户添加的代码不是系统默认代码
                    m_Result = HKManageCommon.AddHKCommodity(hK_Commodity);
                    if (m_Result)
                    {
                        ShowMessageBox.ShowInformation("添加成功!");
                        this.ClearAll();
                        this.QueryHKCommodity();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("添加失败!");
                    }
                }
                catch (Exception ex)
                {
                    string      errCode   = "GL-7703";
                    string      errMsg    = "添加港股交易商品失败!";
                    VTException exception = new VTException(errCode, errMsg, ex);
                    LogHelper.WriteError(exception.ToString(), exception.InnerException);
                    return;
                }

                #endregion
            }
            else if (m_EditType == 2)
            {
                #region 修改操作

                try
                {
                    HK_Commodity hK_Commodity = new HK_Commodity();
                    if (string.IsNullOrEmpty(this.txtHKCommodityCode.Text))
                    {
                        ShowMessageBox.ShowInformation("请选择更新数据!");
                        return;
                    }
                    hK_Commodity.HKCommodityCode = this.txtHKCommodityCode.Text;
                    if (!string.IsNullOrEmpty(this.cmbBreedClassID.Text))
                    {
                        hK_Commodity.BreedClassID = ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex;
                    }
                    else
                    {
                        //cM_Commodity.BreedClassID = AppGlobalVariable.INIT_INT;
                        ShowMessageBox.ShowInformation("请选择品种类型!");
                        return;
                    }
                    //注释掉修改港股代码的系统默认代码值
                    //hK_Commodity.ISSysDefaultCode = AppGlobalVariable.INIT_INT;//用户添加的代码不是系统默认代码
                    hK_Commodity.ISSysDefaultCode = m_ISSysDefaultCode; //当是修改时不改变原来的系统默认代码默认值
                    m_Result = HKManageCommon.UpdateHKCommodity(hK_Commodity);
                    if (m_Result)
                    {
                        ShowMessageBox.ShowInformation("修改成功!");
                        this.ClearAll();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("修改失败!");
                    }
                    this.QueryHKCommodity();
                    //this.txtHKCommodityCode.Enabled = true;//操作结束代码变成可输入状态
                    m_ISSysDefaultCode = AppGlobalVariable.INIT_INT;
                    this.ClearAll();
                }
                catch (Exception ex)
                {
                    string      errCode   = "GL-7704";
                    string      errMsg    = "修改港股交易商品失败!";
                    VTException exception = new VTException(errCode, errMsg, ex);
                    LogHelper.WriteError(exception.ToString(), exception.InnerException);
                    return;
                }

                #endregion
            }
        }
        /// <summary>
        /// 添加熔断_时间段标识
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                CM_FuseTimesection cM_FuseTimesection = new CM_FuseTimesection();
                if (m_CommodityCode != AppGlobalVariable.INIT_STRING)
                {
                    cM_FuseTimesection.CommodityCode = m_CommodityCode;
                }
                else
                {
                    ShowMessageBox.ShowInformation("商品代码不能为空!");
                    return;
                }

                if (!string.IsNullOrEmpty(this.tmStartTime.Text))
                {
                    cM_FuseTimesection.StartTime = Convert.ToDateTime(this.tmStartTime.EditValue);
                }
                else
                {
                    cM_FuseTimesection.StartTime = AppGlobalVariable.INIT_DATETIME;
                }
                if (!string.IsNullOrEmpty(this.tmEndTime.Text))
                {
                    if (!(Convert.ToDateTime(this.tmEndTime.EditValue) < Convert.ToDateTime(this.tmStartTime.EditValue)))
                    {
                        cM_FuseTimesection.EndTime = Convert.ToDateTime(this.tmEndTime.EditValue);
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("结束时间不能小于开始时间!");
                        return;
                    }
                }
                else
                {
                    cM_FuseTimesection.EndTime = AppGlobalVariable.INIT_DATETIME;
                }
                string msg = string.Empty; //错误信息提示变量
                //int Result = CommonParameterSetCommon.AddCMFuseTimesection(cM_FuseTimesection);
                int Result = CommonParameterSetCommon.AddCMFuseTimesection(cM_FuseTimesection, ref msg);

                if (Result != AppGlobalVariable.INIT_INT)
                {
                    ShowMessageBox.ShowInformation("添加成功!");
                    this.ClearAll();
                    this.QueryCMFuseTimesection();
                }
                else
                {
                    ShowMessageBox.ShowInformation(msg);
                }
            }
            catch (Exception ex)
            {
                string      errCode   = "GL-6821";
                string      errMsg    = " 添加熔断_时间段标识失败!";
                VTException exception = new VTException(errCode, errMsg, ex);
                LogHelper.WriteError(exception.ToString(), exception.InnerException);
                return;
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// 确定按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (m_EditType == 1)
            {
                #region 添加操作
                try
                {
                    if (
                        FuturesManageCommon.ExistsSIFBail(
                            ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex) &&
                        FuturesManageCommon.ExistsSIFPosition(
                            ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex))
                    {
                        ShowMessageBox.ShowInformation("此品种的持仓限制和保证金已存在!");
                        return;
                    }
                    QH_SIFBail     qH_SIFBail     = new QH_SIFBail();
                    QH_SIFPosition qH_SIFPosition = new QH_SIFPosition();
                    if (!string.IsNullOrEmpty(this.txtUnilateralPositions.Text))
                    {
                        if (InputTest.intTest(this.txtUnilateralPositions.Text))
                        {
                            qH_SIFPosition.UnilateralPositions = Convert.ToInt32(this.txtUnilateralPositions.Text);
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("请输入数字且第一位数不能为0!");
                            return;
                        }
                    }
                    else
                    {
                        //qH_SIFPosition.UnilateralPositions = AppGlobalVariable.INIT_INT;
                        ShowMessageBox.ShowInformation("请填单边持仓量!");
                        return;
                    }

                    if (!string.IsNullOrEmpty(this.cmbBreedClassID.Text))
                    {
                        qH_SIFBail.BreedClassID = ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex;
                    }
                    else
                    {
                        qH_SIFBail.BreedClassID = AppGlobalVariable.INIT_INT;
                    }
                    if (!string.IsNullOrEmpty(this.txtBailScale.Text))
                    {
                        if (InputTest.DecimalTest(this.txtBailScale.Text))
                        {
                            qH_SIFBail.BailScale = Convert.ToDecimal(this.txtBailScale.Text);
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("格式不正确(只能包含数字和小数点)!");
                            return;
                        }
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("请填写保证金!");
                        return;
                    }

                    if (!string.IsNullOrEmpty(this.cmbBreedClassID.Text))
                    {
                        qH_SIFPosition.BreedClassID = ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex;
                    }
                    else
                    {
                        qH_SIFPosition.BreedClassID = AppGlobalVariable.INIT_INT;
                    }
                    m_Result = FuturesManageCommon.AddQHSIFPositionAndQHSIFBail(qH_SIFPosition, qH_SIFBail);
                    if (m_Result)
                    {
                        ShowMessageBox.ShowInformation("添加成功!");
                        this.ClearAll();
                        this.QueryQHSIFPositionAndBail();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("添加失败!");
                    }
                }
                catch (Exception ex)
                {
                    string      errCode   = "GL-6481";
                    string      errMsg    = "添加股指期货持仓限制和品种_股指期货_保证金失败!";
                    VTException exception = new VTException(errCode, errMsg, ex);
                    LogHelper.WriteError(exception.ToString(), exception.InnerException);
                    return;
                }
                #endregion
            }
            else if (m_EditType == 2)
            {
                #region 修改操作
                try
                {
                    this.cmbBreedClassID.Enabled = false;
                    QH_SIFBail     qH_SIFBail     = new QH_SIFBail();
                    QH_SIFPosition qH_SIFPosition = new QH_SIFPosition();
                    if (m_BreedClassID == AppGlobalVariable.INIT_INT)
                    {
                        ShowMessageBox.ShowInformation("请选择更新数据!");
                        return;
                    }
                    //qH_FutureCosts.BreedClassID = m_BreedClassID;
                    qH_SIFBail.BreedClassID     = ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex;
                    qH_SIFPosition.BreedClassID = ((UComboItem)this.cmbBreedClassID.SelectedItem).ValueIndex;
                    if (!string.IsNullOrEmpty(this.txtUnilateralPositions.Text))
                    {
                        if (InputTest.intTest(this.txtUnilateralPositions.Text))
                        {
                            qH_SIFPosition.UnilateralPositions = Convert.ToInt32(this.txtUnilateralPositions.Text);
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("请输入数字且第一位数不能为0!");
                            return;
                        }
                    }
                    else
                    {
                        // qH_SIFPosition.UnilateralPositions = AppGlobalVariable.INIT_INT;
                        ShowMessageBox.ShowInformation("请填单边持仓量!");
                        return;
                    }
                    if (!string.IsNullOrEmpty(this.txtBailScale.Text))
                    {
                        if (InputTest.DecimalTest(this.txtBailScale.Text))
                        {
                            qH_SIFBail.BailScale = Convert.ToDecimal(this.txtBailScale.Text);
                        }
                        else
                        {
                            ShowMessageBox.ShowInformation("格式不正确(只能包含数字和小数点)!");
                            return;
                        }
                    }
                    else
                    {
                        //qH_SIFBail.BailScale = AppGlobalVariable.INIT_DECIMAL;
                        ShowMessageBox.ShowInformation("请填写保证金!");
                        return;
                    }
                    m_Result = FuturesManageCommon.UpdateQHSIFPositionAndQHSIFBail(qH_SIFPosition, qH_SIFBail);
                    if (m_Result)
                    {
                        ShowMessageBox.ShowInformation("修改成功!");
                        this.ClearAll();
                    }
                    else
                    {
                        ShowMessageBox.ShowInformation("修改失败!");
                    }
                    this.QueryQHSIFPositionAndBail();
                }
                catch (Exception ex)
                {
                    string      errCode   = "GL-6482";
                    string      errMsg    = "修改股指期货持仓限制和品种_股指期货_保证金失败!";
                    VTException exception = new VTException(errCode, errMsg, ex);
                    LogHelper.WriteError(exception.ToString(), exception.InnerException);
                    return;
                }
                #endregion
            }
        }
Ejemplo n.º 11
0
 public ValueNodesContext(UIDispatcher uiDispatcher, IEditValueNodeExpression editValueNodeExpression, string windowContentType, string nameColumnName, string valueColumnName, string typeColumnName, LanguageEditValueProviderFactory languageEditValueProviderFactory, DbgValueNodeImageReferenceService dbgValueNodeImageReferenceService, DbgValueNodeReader dbgValueNodeReader, IClassificationFormatMap classificationFormatMap, ITextBlockContentInfoFactory textBlockContentInfoFactory, CultureInfo formatCulture, ShowMessageBox showMessageBox, Action <string, bool> onValueNodeAssigned)
 {
     UIDispatcher                   = uiDispatcher;
     EditValueNodeExpression        = editValueNodeExpression;
     WindowContentType              = windowContentType;
     NameColumnName                 = nameColumnName;
     ValueColumnName                = valueColumnName;
     TypeColumnName                 = typeColumnName;
     ShowMessageBox                 = showMessageBox;
     ValueEditValueProvider         = languageEditValueProviderFactory.Create(windowContentType);
     NameEditValueProvider          = languageEditValueProviderFactory.Create(windowContentType);
     OnValueNodeAssigned            = onValueNodeAssigned;
     ValueNodeImageReferenceService = dbgValueNodeImageReferenceService;
     ValueNodeReader                = dbgValueNodeReader;
     ClassificationFormatMap        = classificationFormatMap;
     TextBlockContentInfoFactory    = textBlockContentInfoFactory;
     TextClassifierTextColorWriter  = new DbgTextClassifierTextColorWriter();
     Formatter = new ValueNodeFormatter();
     ValueNodeFormatParameters = new DbgValueNodeFormatParameters();
     FormatCulture             = formatCulture;
 }
Ejemplo n.º 12
0
    protected void save_Click(object sender, EventArgs e)
    {
        trainingTeachingActivitiesModel = new TrainingTeachingActivitiesModel();
        trainingTeachingActivitiesBLL   = new TrainingTeachingActivitiesBLL();

        trainingTeachingActivitiesModel.DeptCode    = CommonFunc.FilterSpecialString(RotaryDept.SelectedItem.Value);
        trainingTeachingActivitiesModel.DeptName    = CommonFunc.FilterSpecialString(RotaryDept.SelectedItem.Text);
        trainingTeachingActivitiesModel.TeacherId   = CommonFunc.FilterSpecialString(Teacher.SelectedItem.Value);
        trainingTeachingActivitiesModel.TeacherName = CommonFunc.FilterSpecialString(Teacher.SelectedItem.Text);

        trainingTeachingActivitiesModel.ActivityForm    = CommonFunc.FilterSpecialString(ActivityForm.SelectedItem.Text);
        trainingTeachingActivitiesModel.ActivityFormId  = CommonFunc.FilterSpecialString(ActivityForm.SelectedItem.Value);
        trainingTeachingActivitiesModel.ActivityContent = CommonFunc.FilterSpecialString(ActivityContent.Text);
        trainingTeachingActivitiesModel.MainSpeaker     = CommonFunc.FilterSpecialString(MainSpeaker.Text);
        trainingTeachingActivitiesModel.ClassHour       = CommonFunc.FilterSpecialString(ClassHour.Text);
        trainingTeachingActivitiesModel.ActivityDate    = CommonFunc.FilterSpecialString(ActivityDate.Text);

        trainingTeachingActivitiesModel.Comment = CommonFunc.FilterSpecialString(Comment.Text);

        trainingTeachingActivitiesModel.Writor       = CommonFunc.FilterSpecialString(Writor.Text);
        trainingTeachingActivitiesModel.RegisterDate = CommonFunc.FilterSpecialString(RegisterDate.Text);

        if (string.IsNullOrEmpty(id))
        {
            id = Guid.NewGuid().ToString();
            trainingTeachingActivitiesModel.Id           = id;
            trainingTeachingActivitiesModel.StudentsName = StudentsName.Value.ToString();

            trainingTeachingActivitiesModel.StudentsRealName     = CommonFunc.FilterSpecialString(StudentsRealName.Text.Trim());
            trainingTeachingActivitiesModel.TrainingBaseCode     = CommonFunc.FilterSpecialString(TrainingBaseCode.Value);
            trainingTeachingActivitiesModel.TrainingBaseName     = CommonFunc.FilterSpecialString(TrainingBaseName.Text);
            trainingTeachingActivitiesModel.ProfessionalBaseCode = CommonFunc.FilterSpecialString(ProfessionalBaseCode.Value);
            trainingTeachingActivitiesModel.ProfessionalBaseName = CommonFunc.FilterSpecialString(ProfessionalBaseName.Text);
            trainingTeachingActivitiesModel.TeacherCheck         = teacher_check;
            trainingTeachingActivitiesModel.KzrCheck             = kzr_check;
            trainingTeachingActivitiesModel.BaseCheck            = base_check;
            trainingTeachingActivitiesModel.ManagerCheck         = manager_check;

            if (trainingTeachingActivitiesModel.DeptCode == "0" || trainingTeachingActivitiesModel.DeptName == "==请选择==")
            {
                ShowMessageBox.Showmessagebox(this, "轮转科室不能为空", null);
                return;
            }
            if (trainingTeachingActivitiesModel.TeacherId == "0" || trainingTeachingActivitiesModel.TeacherName == "==请选择==")
            {
                ShowMessageBox.Showmessagebox(this, "指导医师不能为空", null);
                return;
            }
            if (trainingTeachingActivitiesModel.ActivityFormId == "-1" || trainingTeachingActivitiesModel.ActivityForm == "==请选择==")
            {
                ShowMessageBox.Showmessagebox(this, "活动形式不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(trainingTeachingActivitiesModel.ActivityContent))
            {
                ShowMessageBox.Showmessagebox(this, "活动内容不能为空", null);
                return;
            }
            if (trainingTeachingActivitiesModel.ActivityContent.Length > 2000)
            {
                ShowMessageBox.Showmessagebox(this, "活动内容字数不能超过2000字", null);
                return;
            }
            if (string.IsNullOrEmpty(trainingTeachingActivitiesModel.MainSpeaker))
            {
                ShowMessageBox.Showmessagebox(this, "主讲人不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(trainingTeachingActivitiesModel.ActivityDate))
            {
                ShowMessageBox.Showmessagebox(this, "活动日期不能为空", null);
                return;
            }

            if (trainingTeachingActivitiesModel.Comment.Length > 1000)
            {
                ShowMessageBox.Showmessagebox(this, "备注字数不能超过1000字", null);
                return;
            }
            if (trainingTeachingActivitiesBLL.Add(trainingTeachingActivitiesModel))
            {
                try
                {
                    Response.Write("<script language='javascript'> alert('培训教学活动信息添加成功');window.opener.parent.frames.bodyFrame.frames.frmright.window.loadPageList(1);window.close();</script>");
                }
                catch (Exception ex)
                {
                    Response.Write(ex.Message);
                }
            }
        }
        else
        {
            if (trainingTeachingActivitiesModel.DeptCode == "0" || trainingTeachingActivitiesModel.DeptName == "==请选择==")
            {
                ShowMessageBox.Showmessagebox(this, "轮转科室不能为空", null);
                return;
            }
            if (trainingTeachingActivitiesModel.ActivityFormId == "-1" || trainingTeachingActivitiesModel.ActivityForm == "==请选择==")
            {
                ShowMessageBox.Showmessagebox(this, "活动形式不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(trainingTeachingActivitiesModel.ActivityContent))
            {
                ShowMessageBox.Showmessagebox(this, "活动内容不能为空", null);
                return;
            }
            if (trainingTeachingActivitiesModel.ActivityContent.Length > 2000)
            {
                ShowMessageBox.Showmessagebox(this, "活动内容字数不能超过2000字", null);
                return;
            }
            if (string.IsNullOrEmpty(trainingTeachingActivitiesModel.MainSpeaker))
            {
                ShowMessageBox.Showmessagebox(this, "主讲人不能为空", null);
                return;
            }
            if (string.IsNullOrEmpty(trainingTeachingActivitiesModel.ActivityDate))
            {
                ShowMessageBox.Showmessagebox(this, "活动日期不能为空", null);
                return;
            }

            if (trainingTeachingActivitiesModel.Comment.Length > 1000)
            {
                ShowMessageBox.Showmessagebox(this, "备注字数不能超过1000字", null);
                return;
            }
            if (trainingTeachingActivitiesBLL.Update(trainingTeachingActivitiesModel, id))
            {
                try
                {
                    Response.Write("<script language='javascript'> alert('培训教学活动信息修改成功');window.opener.window.loadPageList('" + pi + "');window.close();</script>");
                }
                catch (Exception ex)
                {
                    Response.Write(ex.Message);
                }
            }
        }
    }
Ejemplo n.º 13
0
        // for 2.0: not XHTML attributes must be registered with RegisterExpandoAttribute
        // when it will be implemented, in this case WebUIValidation_2.0.js muist be refactored
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

#if NET_2_0
            if (EnableClientScript && pre_render_called && Page.AreValidatorsUplevel(ValidationGroup))
            {
#else
            if (EnableClientScript && pre_render_called && Page.AreValidatorsUplevel())
            {
#endif
                /* force an ID here if we weren't assigned one */
                if (ID == null)
                {
                    writer.AddAttribute(HtmlTextWriterAttribute.Id, ClientID);
                }
#if NET_2_0
                if (ValidationGroup != String.Empty)
                {
                    RegisterExpandoAttribute(ClientID, "validationGroup", ValidationGroup);
                }

                if (HeaderText.Length > 0)
                {
                    RegisterExpandoAttribute(ClientID, "headertext", HeaderText);
                }

                if (ShowMessageBox)
                {
                    RegisterExpandoAttribute(ClientID, "showmessagebox", "True");
                }

                if (!ShowSummary)
                {
                    RegisterExpandoAttribute(ClientID, "showsummary", "False");
                }

                if (DisplayMode != ValidationSummaryDisplayMode.BulletList)
                {
                    RegisterExpandoAttribute(ClientID, "displaymode", DisplayMode.ToString());
                }
#else
                if (HeaderText != "")
                {
                    writer.AddAttribute("headertext", HeaderText);
                }

                if (ShowMessageBox)
                {
                    writer.AddAttribute("showmessagebox", ShowMessageBox.ToString());
                }

                if (ShowSummary == false)
                {
                    writer.AddAttribute("showsummary", ShowSummary.ToString());
                }

                if (DisplayMode != ValidationSummaryDisplayMode.BulletList)
                {
                    writer.AddAttribute("displaymode", DisplayMode.ToString());
                }
#endif

                if (!has_errors)
                {
                    writer.AddStyleAttribute("display", "none");
                }
            }
        }
Ejemplo n.º 14
0
        private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            Exception ex = e.ExceptionObject as Exception;

            ShowMessageBox.Show(ex.Message, this.MainWindow);
        }