コード例 #1
0
        //static long nextTick = DateTime.Now.Ticks;

        public BusinessGraphicsForm(BusinessGraphicsSourceDesign sourceDesign, Window window)
        {
            InitializeComponent();
            if (window is ActiveWindow)
            {
                wnd = (ActiveWindow)window;
                BackColor = wnd.BorderColorFrienly;
            }
            sourceDesign.Wnd = wnd;
            sourceDesign.IsPlayerMode = true;
            _sourceCopy = SourceDesignClone(sourceDesign);
            this.sourceDesign = sourceDesign;
            this.sourceDesign.InitializeChart(true);

            Controls.Clear();
            this.sourceDesign.AddChartToContainer(this, wnd);

            FormClosing += BusinessGraphicsForm_FormClosing;

            if (sourceDesign.ODBCRefreshInterval > 0)
            {
                int time = sourceDesign.ODBCRefreshInterval*1000;
                if (((BusinessGraphicsResourceInfo) sourceDesign.ResourceDescriptor.ResourceInfo).ProviderType ==
                    ProviderTypeEnum.ODBC)
                    refreshTimer = new Timer(RefreshChart, "Timer", time, time);
            }
            //начал делать тут проверку, а она оказывается не нужна//
            //nextTick += time; 
        }
コード例 #2
0
ファイル: JupiterForm.cs プロジェクト: AlexSneg/VIRD-1.0
        private void SetRGBTiming(ActiveWindow wnd)
        {
            if (wnd.Source.ResourceDescriptor == null || wnd.Source.ResourceDescriptor.ResourceInfo == null)
                return;
            ResourceInfoForHardwareSource resInfo =
                wnd.Source.ResourceDescriptor.ResourceInfo as ResourceInfoForHardwareSource;
            if (resInfo == null) return;

            if (!resInfo.RGBParam.ManualSetting)
            {
                axGalileoCtrl.DetectRGBTiming();
                return;
            }

            SetRGBParam(resInfo.RGBParam);
        }
コード例 #3
0
ファイル: ArcGISMapForm.cs プロジェクト: AlexSneg/VIRD-1.0
        public ArcGISMapForm(ArcGISMapSourceDesign sourceDesign, Window window)
        {
            InitializeComponent();
            if (window is ActiveWindow)
            {
                wnd = (ActiveWindow)window;
                BackColor = wnd.BorderColorFrienly;
            }
            //sourceDesign.Wnd = wnd;
            //sourceDesign.IsPlayerMode = true;
            //_sourceCopy = SourceDesignClone(sourceDesign);
            //this.sourceDesign = sourceDesign;
            //this.sourceDesign.InitializeChart(true);

            //Controls.Clear();
            //this.sourceDesign.AddChartToContainer(this, wnd);

        }
コード例 #4
0
 protected void ddlSheng_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlSheng.SelectedValue != "-1")
     {
         PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(ddlSheng.SelectedValue) + ActiveWindow.GetHideReference());
     }
 }
コード例 #5
0
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                //lby↓
                int    AttachmentID = BLLPlatform.FindAttachmentID(Convert.ToInt32(Session["PlatformID"]));
                string path         = at.FindPath(AttachmentID);

                Common.Entities.Platform platform = new Common.Entities.Platform();
                string PlatformName = BLLPlatform.FindByPlatformID(Convert.ToInt32(Session["PlatformID"])).PlatformName;//原平台名称
                if (txtPlatformName.Text.Trim() == "")
                {
                    Alert.ShowInTop("平台名称不能为空!");
                    txtPlatformName.Reset();
                    return;
                }
                //新更新的数据是否与原数据的平台名称相同
                if (txtPlatformName.Text.Trim() != PlatformName)//不同
                {
                    if (BLLPlatform.FindByPlatformName(txtPlatformName.Text.Trim()) == null)
                    {
                        platform.PlatformName = txtPlatformName.Text.Trim();
                    }
                    else
                    {
                        if (BLLPlatform.FindByPlatformName(txtPlatformName.Text.Trim()).IsPass == false)
                        {
                            Alert.ShowInTop("该平台名称正在审核中,请等待!");
                            txtPlatformName.Text = "";
                            return;
                        }
                        if (BLLPlatform.FindByPlatformName(txtPlatformName.Text.Trim()).IsPass == true)
                        {
                            Alert.ShowInTop("平台名称已存在!");
                            txtPlatformName.Text = "";
                            return;
                        }
                    }
                }
                else//相同
                {
                    if (txtPlatformName.Text.Trim() == PlatformName)//新更新的数据与原数据的平台名称相同
                    {
                        platform.PlatformName = txtPlatformName.Text.Trim();
                    }
                    else
                    {
                        if (BLLPlatform.FindByPlatformName(txtPlatformName.Text.Trim()).IsPass == false)
                        {
                            Alert.ShowInTop("该平台名称正在审核中,请等待!");
                            txtPlatformName.Text = "";
                            return;
                        }
                        if (BLLPlatform.FindByPlatformName(txtPlatformName.Text.Trim()).IsPass == true)
                        {
                            Alert.ShowInTop("平台名称已存在!");
                            txtPlatformName.Text = "";
                            return;
                        }
                    }
                }

                // platform.PlatformName = txtPlatformName.Text.Trim();
                platform.PlatformRank = DropDownListPlatformRank.SelectedText;
                platform.AgreeUnit    = DropDownListAgreeUnit.SelectedText;
                platform.AgreeTime    = DatePicker_AgreeTime.SelectedDate;
                platform.PlatformType = DropDownListPlatformType.SelectedText;
                platform.SecrecyLevel = DropDownList_SecrecyLevel.SelectedIndex + 1;
                platform.EntryPerson  = BLLPlatform.FindByPlatformID(Convert.ToInt32(Session["PlatformID"])).EntryPerson;
                //lby↓
                platform.PlatformManagement = txtPlatformManagement.Text.Trim();
                platform.AgreeNumber        = txtAgreeNumber.Text.Trim();
                platform.AgreeExpenditure   = txtAgreeExpenditure.Text.Trim();
                platform.PlatformPrincipal  = txtPlatformPrincipal.Text.Trim();
                platform.PlatformMember     = txtPlatformMember.Text.Trim();

                //向操作日志表中
                if (Convert.ToInt32(Session["SecrecyLevel"]) != 5)
                {
                    platform.IsPass               = false;
                    operationLog.LoginIP          = " ";
                    operationLog.LoginName        = platform.EntryPerson;
                    operationLog.OperationType    = "更新";
                    operationLog.OperationContent = "Platform";
                    operationLog.OperationTime    = DateTime.Now;
                    //operationLog.OperationDataID = Convert.ToInt32(Session["PlatformID"]);
                    //operationLog.Remark = platform.PlatformID.ToString();
                    //PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("平台信息已提交审核!"));

                    //lby↓
                    int attachid = pm.UpLoadFile(fileupload).Attachid;
                    if (attachid != -3)//有值
                    {
                        switch (attachid)
                        {
                        case -1:
                            Alert.ShowInTop("文件类型不符,请重新选择!");
                            return;

                        case 0:
                            Alert.ShowInTop("文件名已经存在!");
                            return;

                        case -2:
                            Alert.ShowInTop("文件不能大于150M");
                            return;
                        }
                        platform.AttachmentID = attachid;//附件为新插入的附件ID
                    }
                    else//上传控件没有值
                    {
                        if (AttachmentID != 0)//原来有附件
                        {
                            platform.AttachmentID = AttachmentID;
                        }
                    }
                    BLLPlatform.insert(platform);//插入
                    operationLog.OperationDataID = Convert.ToInt32(Session["PlatformID"]);
                    operationLog.Remark          = platform.PlatformID.ToString();
                    BLLOp.Insert(operationLog);//将成果更新插入操作表
                    BLLPlatform.UpdateIsPass(Convert.ToInt32(Session["PlatformID"]), false);
                    PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("平台信息已提交,正在等待审核!"));
                }
                else
                {
                    platform.IsPass     = true;
                    platform.PlatformID = Convert.ToInt32(Session["PlatformID"]);
                    //lby↓
                    int attachid = pm.UpLoadFile(fileupload).Attachid;
                    if (attachid != -3)//上传控件是否有值
                    {
                        switch (attachid)
                        {
                        case -1:
                            Alert.ShowInTop("文件类型不符,请重新选择!");
                            return;

                        case 0:
                            Alert.ShowInTop("文件名已经存在!");
                            return;

                        case -2:
                            Alert.ShowInTop("文件不能大于150M");
                            return;
                        }
                        platform.AttachmentID = attachid;//附件为新插入的附件ID
                        pm.DeleteFile(AttachmentID, path);
                    }
                    else //上传空间没有值
                    {
                        if (AttachmentID != 0)
                        {
                            platform.AttachmentID = AttachmentID;
                        }
                    }
                    BLLPlatform.Update(platform);//5级直接更新平台表
                    PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("平台信息已更新完成!"));
                }
            }
            catch (Exception ex)
            {
                pm.SaveError(ex, this.Request);
            }
        }
コード例 #6
0
 private void LoadData()
 {
     btnClose.OnClientClick = ActiveWindow.GetHideReference();
 }
コード例 #7
0
        private void ShowUI()
        {
            //string Pkid = TStar.Web.Globals.Account.Pkid;
            Model.Jcgl.V_jc_xs_hz xs = BLL.Jcgl.Jc_xs.GetEntity <Model.Jcgl.V_jc_xs_hz>(Pkid);
            if (String.IsNullOrEmpty(xs.Pkid))
            {
                PageContext.RegisterStartupScript(Alert.GetShowInParentReference("页面参数不正确 !", "打开失败", MessageBoxIcon.Error) + ActiveWindow.GetHideReference());
                return;
            }

            // 获取个人业绩统计
            //DataTable dt = BLL.Jcgl.Jc_xs.TotalGrxm(xs.Pkid);

            // 个人基本信息
            this.tbxXh.Text             = this.lblXhOld.Text = xs.Xh;
            this.tbxXm.Text             = this.lblXmOld.Text = xs.Xm;
            this.lblFzjd.Text           = xs.Fzzt;
            this.hfdFzztdm.Text         = xs.Fzztdm;
            this.ddlDzbbh.SelectedValue = xs.Dzbbh;
            this.ddlDzb_SelectedIndexChanged(null, null);
            this.ddlZybh.SelectedValue = xs.Zybh;
            this.ddlZymc_SelectedIndexChanged(null, null);
            this.ddlBjbh.SelectedValue = xs.Bjbh;
            this.ddlXbdm.SelectedValue = xs.Xbdm;
            this.tbxSfzh.Text          = xs.Sfzh;
            this.tbxSjhm.Text          = this.lblSjhmOld.Text = xs.Sjhm;
            this.tbxMz.Text            = xs.Mz;
            this.tbxJg.Text            = xs.Jg;
            this.tbxZw.Text            = xs.Zw;
            this.tbxJtdz.Text          = xs.Jtdz;
            if (!string.IsNullOrEmpty(xs.PhotoUrl))
            {
                this.imgPhoto.ImageUrl = xs.PhotoUrl;
            }

            // 发展前信息
            this.tbxSqrdrq.Text            = xs.Sqrdrq;
            this.tbxJjfzrq.Text            = xs.Jjfzrq;
            this.ddlRdlxrbh1.SelectedValue = xs.Rdlxrbh1;
            this.tbxDxjyrq.Text            = xs.Dxjyrq;
            this.ddlDxkhztdm.SelectedValue = xs.Dxkhztdm;
            //this.tbxLxr2.Text = xs.Rdlxrxm2;
            this.tbxXxcjpm.Text = xs.Xxcjpm;
            this.tbxZhkppm.Text = xs.Zhkppm;
            this.tbxBjgms.Text  = xs.Bjgms;

            // 发展中信息
            string where = string.Format("Xsbh='{0}'", xs.Pkid);
            DataTable dtFzz = BLL.Jcgl.Jc_xs.GetList <Model.Lcgl.V_lc_nfzmd>(where, "Fzdxrq DESC");

            if (dtFzz.Rows.Count > 0)
            {
                this.gplYsdb.Hidden = false;
                Model.Lcgl.V_lc_nfzmd ys = TU.Common.ConvertHelper.ConvertToEntity <Model.Lcgl.V_lc_nfzmd>(dtFzz.Rows[0]);
                this.lblFzdxrq.Text = ys.Fzdxrq;
                this.lblZsjg.Text   = ys.Zsjg;
                this.lblDbjg.Text   = ys.Dbjg;
                if (ys.Dbjgdm == "0")
                {
                    this.lblDbjg.CssClass = "spanRed";
                }
                this.lblDbrq.Text   = ys.Dbrq;
                this.lblDbdd.Text   = ys.Dbdd;
                this.lblDbzcy.Text  = ys.Dbzcy;
                this.lblDbpjyj.Text = ys.Dbpjyj;
                if (ys.Zsjgdm == "0")
                {
                    this.lblZsjg.CssClass = "spanRed";
                    this.pnlBz.Hidden     = false;
                    this.lblBz.Text       = ys.Zswtgyy;
                }
            }

            // 发展后信息
            TStar.Web.Globals.SystemSetting.Fzzt fzztdm = TU.Common.ConvertHelper.EnumParse <TStar.Web.Globals.SystemSetting.Fzzt>(xs.Fzztdm);
            switch (fzztdm)
            {
            case TStar.Web.Globals.SystemSetting.Fzzt.Ybdy:
                //if (!string.IsNullOrEmpty(xs.Zzrq)) this.tbxZzrq.Label = "延期转正日期";
                this.tbxZzrq.EmptyText = "延期转正才需填写";
                break;

            case TStar.Web.Globals.SystemSetting.Fzzt.Zsdy:
                this.tbxZzrq.Label = "转 正 日 期";
                break;

            default:
                return;
            }
            this.gplFzh.Hidden = false;
            this.tbxRdrq.Text  = xs.Rdrq;
            this.tbxZysbh.Text = xs.Zysbh;
            this.tbxZzrq.Text  = xs.Zzrq;
        }
コード例 #8
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
 }
コード例 #9
0
ファイル: ModuleInstaller.aspx.cs プロジェクト: publicwmh/eas
 protected void btnOK_Click(object sender, EventArgs e)
 {
     this.SaveData();
     PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
 }
コード例 #10
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
                this.ProjectId = this.CurrUser.LoginProjectId;
                this.drpCheckTypeCode.DataValueField = "CheckTypeCode";
                this.drpCheckTypeCode.DataTextField  = "CheckTypeContent";
                this.drpCheckTypeCode.DataSource     = BLL.CheckTypeSetService.GetCheckTypeSetList();
                this.drpCheckTypeCode.DataBind();
                Funs.FineUIPleaseSelect(this.drpCheckTypeCode);

                this.drpViolationRule.DataValueField = "ViolationRuleId";
                this.drpViolationRule.DataTextField  = "ViolationRule";
                this.drpViolationRule.DataSource     = ViolationRuleService.GetViolationRuleList();
                this.drpViolationRule.DataBind();
                Funs.FineUIPleaseSelect(this.drpViolationRule);

                this.ManageCheckId = Request.Params["ManageCheckId"];
                if (!string.IsNullOrEmpty(this.ManageCheckId))
                {
                    Model.Administrative_ManageCheck manageCheck = BLL.ManageCheckService.GetManageCheckById(this.ManageCheckId);
                    if (manageCheck != null)
                    {
                        this.ProjectId        = manageCheck.ProjectId;
                        this.Grid1.DataSource = BLL.CheckTypeSetService.GetCheckTypeSetsBySupCheckTypeCode(manageCheck.CheckTypeCode, ManageCheckId);
                        this.Grid1.PageIndex  = 0;
                        this.Grid1.DataBind();
                        if (Grid1.Rows.Count > 0)
                        {
                            this.Grid1.Hidden = false;
                        }

                        this.txtManageCheckCode.Text = BLL.CodeRecordsService.ReturnCodeByDataId(this.ManageCheckId);
                        if (manageCheck.CheckTypeCode != null)
                        {
                            this.drpCheckTypeCode.SelectedValue = manageCheck.CheckTypeCode;
                        }
                        this.txtSupplyCheck.Text            = manageCheck.SupplyCheck;
                        this.drpIsSupplyCheck.SelectedValue = Convert.ToString(manageCheck.IsSupplyCheck);
                        this.drpViolationRule.SelectedValue = Convert.ToString(manageCheck.ViolationRule);
                        this.txtCheckPerson.Text            = manageCheck.CheckPerson;
                        if (manageCheck.CheckTime != null)
                        {
                            this.txtCheckTime.Text = string.Format("{0:yyyy-MM-dd}", manageCheck.CheckTime);
                        }
                        this.txtVerifyPerson.Text = manageCheck.VerifyPerson;
                        if (manageCheck.VerifyTime != null)
                        {
                            this.txtVerifyTime.Text = string.Format("{0:yyyy-MM-dd}", manageCheck.VerifyTime);
                        }
                    }
                }
                else
                {
                    ////自动生成编码
                    this.txtManageCheckCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ManageCheckMenuId, this.ProjectId, this.CurrUser.UnitId);
                    this.txtCheckTime.Text       = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
                    this.txtVerifyTime.Text      = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
                }
                ///初始化审核菜单
                this.ctlAuditFlow.MenuId    = BLL.Const.ManageCheckMenuId;
                this.ctlAuditFlow.DataId    = this.ManageCheckId;
                this.ctlAuditFlow.ProjectId = this.ProjectId;
                this.ctlAuditFlow.UnitId    = this.CurrUser.UnitId;
            }
        }
コード例 #11
0
ファイル: ShowFzlc.aspx.cs プロジェクト: hzlloach/EPBMS
        private void ShowUI()
        {
            Model.Jcgl.V_jc_xs xs = BLL.Jcgl.Jc_xs.GetEntity <Model.Jcgl.V_jc_xs>(Pkid);
            if (String.IsNullOrEmpty(xs.Pkid))
            {
                PageContext.RegisterStartupScript(Alert.GetShowInParentReference("页面参数不正确 !", "打开失败", MessageBoxIcon.Error) + ActiveWindow.GetHideReference());
                return;
            }

            // 获取个人业绩统计
            DataTable dt = BLL.Jcgl.Jc_xs.TotalGrxm(xs.Pkid);

            // 个人基本信息
            this.lblXh.Text     = xs.Xh;
            this.lblXm.Text     = xs.Xm;
            this.lblFzjd.Text   = xs.Fzzt;
            this.hfdFzztdm.Text = xs.Fzztdm;
            this.lblDzb.Text    = xs.Dzbmc;
            this.lblZymc.Text   = xs.Zymc;
            this.lblBjmc.Text   = xs.Bjmc;
            this.lblXb.Text     = xs.Xb;
            this.lblSfzh.Text   = xs.Sfzh;
            this.lblSjhm.Text   = xs.Sjhm;
            this.lblMz.Text     = xs.Mz;
            this.lblJg.Text     = xs.Jg;
            this.lblZw.Text     = xs.Zw;
            this.lblJtdz.Text   = xs.Jtdz;
            if (!string.IsNullOrEmpty(xs.PhotoUrl))
            {
                this.imgPhoto.ImageUrl = xs.PhotoUrl;
            }

            // 发展前信息
            this.lblSqrdrq.Text = xs.Sqrdrq;
            this.lblJjfzrq.Text = xs.Jjfzrq;
            this.lblLxr1.Text   = xs.Rdlxrxm1;
            this.lblDxjyrq.Text = xs.Dxjyrq;
            this.lblDxkhzt.Text = xs.Dxkhzt;
            this.lblLxr2.Text   = xs.Rdlxrxm2;
            this.lblXxcjpm.Text = xs.Xxcjpm;
            this.lblZhkppm.Text = xs.Zhkppm;
            this.lblBjgms.Text  = xs.Bjgms;

            this.lblSxhb0.Text = dt.Rows[0]["Sxhb"].ToString();
            this.lblZyfw0.Text = dt.Rows[0]["Zyfw"].ToString();
            this.lblJshj0.Text = dt.Rows[0]["Jshj"].ToString();
            if (this.lblSxhb0.Text != "0")
            {
                this.lblSxhb0.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Sxhblbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Fzdx), "弹出窗-" + xs.Xm + "-思想汇报列表【发展前】");
            }
            if (this.lblZyfw0.Text != "0")
            {
                this.lblZyfw0.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Zyfwlbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Fzdx), "弹出窗-" + xs.Xm + "-志愿服务列表【发展前】");
            }
            if (this.lblJshj0.Text != "0/0/0/0")
            {
                this.lblJshj0.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Jshjlbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Fzdx), "弹出窗-" + xs.Xm + "-竞赛获奖列表【发展前】");
            }
            //this.lblQtxm0.Text = dt.Rows[0]["Qtxm"].ToString();

            // 发展中信息
            string where = string.Format("Xsbh='{0}' AND Ztdm='{1}'", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Status.Submitted);
            DataTable dtFzz = BLL.Jcgl.Jc_xs.GetList <Model.Lcgl.V_lc_nfzmd>(where, "Fzdxrq DESC");

            if (dtFzz.Rows.Count > 0)
            {
                this.tabFzz.Hidden = false;
                Model.Lcgl.V_lc_nfzmd ys = TU.Common.ConvertHelper.ConvertToEntity <Model.Lcgl.V_lc_nfzmd>(dtFzz.Rows[0]);
                this.lblFzdxrq.Text = xs.Fzdxrq;
                this.lblZsjg.Text   = ys.Zsjg;
                this.lblDbjg.Text   = ys.Dbjg;
                if (ys.Dbjgdm == "0")
                {
                    this.lblDbjg.CssClass = "spanRed";
                }
                this.lblDbrq.Text   = ys.Dbrq;
                this.lblDbdd.Text   = ys.Dbdd;
                this.lblDbzcy.Text  = ys.Dbzcy;
                this.lblDbpjyj.Text = ys.Dbpjyj;
                if (ys.Zsjgdm == "0")
                {
                    this.lblZsjg.CssClass = "spanRed";
                    this.pnlBz.Hidden     = false;
                    this.lblBz.Text       = ys.Zswtgyy;
                }
            }

            // 发展后信息
            TStar.Web.Globals.SystemSetting.Fzzt fzztdm = TU.Common.ConvertHelper.EnumParse <TStar.Web.Globals.SystemSetting.Fzzt>(xs.Fzztdm);
            switch (fzztdm)
            {
            case TStar.Web.Globals.SystemSetting.Fzzt.Ybdy:
                bool isYq = !string.IsNullOrEmpty(xs.Zzrq);
                if (isYq)
                {
                    this.lblZzrq.CssClass = "spanRed";
                }
                this.lblZzrq.Text   = isYq ? (xs.Zzrq + "【延期】") : DateTime.Parse(xs.Rdrq).AddYears(1).ToString("yyyy.MM.dd");
                this.pnlTjYb.Hidden = false;
                this.pnlTjZs.Hidden = true;
                this.lblSxhb1.Text  = dt.Rows[1]["Sxhb"].ToString();
                this.lblZyfw1.Text  = dt.Rows[1]["Zyfw"].ToString();
                this.lblSlx1.Text   = dt.Rows[1]["Slx"].ToString();
                if (this.lblSxhb1.Text != "0")
                {
                    this.lblSxhb1.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Sxhblbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Ybdy), "弹出窗-" + xs.Xm + "-思想汇报列表【发展后】");
                }
                if (this.lblZyfw1.Text != "0")
                {
                    this.lblZyfw1.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Zyfwlbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Ybdy), "弹出窗-" + xs.Xm + "-志愿服务列表【发展后】");
                }
                //if (this.lblSlx1.Text != "0/0/0/0") this.lblSlx1.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Slxlbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Fzdx), "弹出窗-" + xs.Xm + "-竞赛获奖列表【发展前】");
                //this.lblQtxm0.Text = dt.Rows[0]["Qtxm"].ToString();
                break;

            case TStar.Web.Globals.SystemSetting.Fzzt.Zsdy:
                this.lblZzrq.Text   = xs.Zzrq;
                this.lblZzrq.Label  = "转正日期";
                this.pnlTjYb.Hidden = true;
                this.pnlTjZs.Hidden = false;
                this.lblSxhb2.Text  = dt.Rows[2]["Sxhb"].ToString();
                this.lblZyfw2.Text  = dt.Rows[2]["Zyfw"].ToString();
                this.lblSlx2.Text   = dt.Rows[2]["Slx"].ToString();
                if (this.lblSxhb2.Text != "0")
                {
                    this.lblSxhb2.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Sxhblbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Zsdy), "弹出窗-" + xs.Xm + "-思想汇报列表【发展后】");
                }
                if (this.lblZyfw2.Text != "0")
                {
                    this.lblZyfw2.OnClientClick = wndView.GetShowReference(string.Format("../Xmgl/Zyfwlbgr.aspx?fzrbh={0}&fzzt={1}", xs.Pkid, (int)TStar.Web.Globals.SystemSetting.Fzzt.Zsdy), "弹出窗-" + xs.Xm + "-志愿服务列表【发展后】");
                }
                break;

            default:
                return;
            }
            this.tabFzh.Hidden = false;
            this.lblRdrq.Text  = xs.Rdrq;
            this.lblZysbh.Text = xs.Zysbh;
        }
コード例 #12
0
        protected void RISK_Add_Click(object sender, EventArgs e)
        {
            try
            {
                var db   = new SAFEDB();
                var risk = new TH_TRISK01("new");
                risk.FEATURE_CODE = this.FEATURE_CODE.Text;
                var parentHAZA = (from x in db.TH_THAZA01
                                  where x.HAZA_ID == risk.FEATURE_CODE
                                  select x).FirstOrDefault();
                var user = new AdvUserInfo(GetIdentityName());

                risk.REC_CREATOR = user.USER_ID;
                risk.RISK_DEPT   = user.GetDept();
                risk.RISK_STATUS = this.RISK_STATUS.SelectedValue;

                try
                {
                    risk.RISK_L = decimal.Parse(this.RISK_L.Text);
                }
                catch
                {
                    risk.RISK_L = 0;
                }
                try
                {
                    risk.RISK_E = decimal.Parse(this.RISK_E.Text);
                }
                catch
                {
                    risk.RISK_E = 0;
                }
                try
                {
                    risk.RISK_C = decimal.Parse(this.RISK_C.Text);
                }
                catch
                {
                    risk.RISK_C = 0;
                }
                try
                {
                    risk.RISK_D = decimal.Parse(this.RISK_D.Text);
                }
                catch
                {
                    RISKCalc(sender, e);
                    risk.RISK_L = decimal.Parse(this.RISK_D.Text);
                }

                risk.RISK_SOL       = ReadSOL_Grid();
                risk.RISK_LVL       = this.RISK_LVL.Text;
                risk.RISK_MOD       = this.RISK_MOD.Text;
                risk.RISK_DECONTENT = this.RISK_DESC.Text;
                //var re = risk.AddtoDB();
                var a = db.Set <TH_TRISK01>().Add(risk);
                db.SaveChanges();
                db.Dispose();
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("add" + "_" + risk.RISK_ID));
            }
            catch (Exception ex)
            {
                Notify.ShowMessage(ex.Message);
            }
        }
コード例 #13
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();
            string          Mode     = Request.QueryString["Mode"].ToString();
            string          PersonId = "";

            if (Request.QueryString["v_PersonId"] != null)
            {
                PersonId = Request.QueryString["v_PersonId"].ToString();
            }


            if (Mode == "New")
            {
                familymedicalantecedentsDto personmedicalhistoryDtoDto = new familymedicalantecedentsDto();
                var x = ddlDx.SelectedText.ToString().Split('|');
                //Obtener Disease
                systemparameterDto objEntity = _objBL.GetSystemParameter(ref objOperationResult, 149, int.Parse(x[1].ToString()));



                personmedicalhistoryDtoDto.v_PersonId = Session["PersonId"].ToString();

                personmedicalhistoryDtoDto.i_TypeFamilyId = int.Parse(x[1].ToString());

                if (ddlDx.SelectedValue == "80" || ddlDx.SelectedValue == "81" || ddlDx.SelectedValue == "82" || ddlDx.SelectedValue == "83" || ddlDx.SelectedValue == "84")
                {
                    personmedicalhistoryDtoDto.v_DiseasesId = Session["OtroDxId"].ToString();
                }
                else
                {
                    personmedicalhistoryDtoDto.v_DiseasesId = objEntity.v_Value1;
                }

                personmedicalhistoryDtoDto.v_Comment = txtComentario.Text;

                _objHistoryBL.AddFamiliar(ref objOperationResult, personmedicalhistoryDtoDto, ((ClientSession)Session["objClientSession"]).GetAsList());
            }
            else if (Mode == "Edit")
            {
                familymedicalantecedentsDto personmedicalhistoryDtoDto = (familymedicalantecedentsDto)Session["objEntity"];

                var x = ddlDx.SelectedText.ToString().Split('|');

                //Obtener Disease
                systemparameterDto objEntity = _objBL.GetSystemParameter(ref objOperationResult, 149, int.Parse(x[1].ToString()));


                //personmedicalhistoryDtoDto.v_DiseasesId = objEntity.v_Value1;
                if (ddlDx.SelectedValue == "80" || ddlDx.SelectedValue == "81" || ddlDx.SelectedValue == "82" || ddlDx.SelectedValue == "83" || ddlDx.SelectedValue == "84")
                {
                    personmedicalhistoryDtoDto.v_DiseasesId = Session["OtroDxId"].ToString();
                }
                else
                {
                    personmedicalhistoryDtoDto.v_DiseasesId = objEntity.v_Value1;
                }

                personmedicalhistoryDtoDto.v_Comment      = txtComentario.Text;
                personmedicalhistoryDtoDto.i_TypeFamilyId = int.Parse(x[1].ToString());

                _objHistoryBL.UpdateFamiliar(ref objOperationResult, personmedicalhistoryDtoDto, ((ClientSession)Session["objClientSession"]).GetAsList());
            }
            Session["GrupoFamiliarId"] = null;
            //Analizar el resultado de la operación
            if (objOperationResult.Success == 1)  // Operación sin error
            {
                // Cerrar página actual y hacer postback en el padre para actualizar
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
            }
            else  // Operación con error
            {
                Alert.ShowInTop("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage);
                // Se queda en el formulario.
            }
        }
コード例 #14
0
        protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
        {
            string ccode = Grid1.DataKeys[Grid1.SelectedRowIndexArray[0]][0].ToString();
            string cname = Grid1.DataKeys[Grid1.SelectedRowIndexArray[0]][1].ToString();
            string ccate = Grid1.DataKeys[Grid1.SelectedRowIndexArray[0]][2].ToString();

            PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(ccode, cname, ccate) + ActiveWindow.GetHideReference());
        }
コード例 #15
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Grid1.SelectedRowIndexArray.Length == 0)
            {
                Alert.Show("请至少选择一项!", MessageBoxIcon.Information);
            }
            else
            {
                var cTel  = new StringBuilder();
                var cName = new StringBuilder();
                var cCate = new StringBuilder();

                foreach (var rowIndex in Grid1.SelectedRowIndexArray)
                {
                    if (!string.IsNullOrWhiteSpace(Grid1.DataKeys[rowIndex][1].ToString()))
                    {
                        cTel.Append(Grid1.DataKeys[rowIndex][0] + ",");
                        cName.Append(Grid1.DataKeys[rowIndex][1] + ",");
                        cCate.Append(Grid1.DataKeys[rowIndex][2] + ",");
                    }
                }

                var code = cTel.ToString().TrimEnd(',');
                var name = cName.ToString().TrimEnd(',');
                var cate = cCate.ToString().TrimEnd(',');

                PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(code, name, cate) + ActiveWindow.GetHideReference());
            }
        }
コード例 #16
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            OperationResult objOperationResult = new OperationResult();
            diseasesDto     objDiseaseDto      = new diseasesDto();
            diseasesDto     objDiseaseDto1     = new diseasesDto();

            if (Session["DiseasesId"] != null)
            {
                objDiseaseDto = oServiceBL.GetDiseases(ref objOperationResult, Session["DiseasesId"].ToString());

                objDiseaseDto.v_CIE10Id = Session["Cie10Id"].ToString();
                objDiseaseDto.v_Name    = txtDxModificado.Text;
                oServiceBL.UpdateDiseases(ref objOperationResult, objDiseaseDto, ((ClientSession)Session["objClientSession"]).GetAsList());

                //_objDiseasesList.v_DiseasesId = objDiseaseDto.v_DiseasesId;
                //_objDiseasesList.v_CIE10Id = objDiseaseDto.v_CIE10Id;
                //_objDiseasesList.v_Name = objDiseaseDto.v_Name;
            }
            else
            {
                objDiseaseDto.v_CIE10Id = Session["Cie10Id"].ToString();
                objDiseaseDto.v_Name    = txtDxModificado.Text;


                objDiseaseDto1 = oServiceBL.GetIsValidateDiseases(ref objOperationResult, objDiseaseDto.v_Name);

                if (objDiseaseDto1 == null)
                {
                    objDiseaseDto.v_DiseasesId = oServiceBL.AddDiseases(ref objOperationResult, objDiseaseDto, ((ClientSession)Session["objClientSession"]).GetAsList());
                }
                else
                {
                    Alert.Show("Escoja uno que tenga código interno", "Error de validación", MessageBoxIcon.Warning);
                    return;
                }
            }

            //Grabar el Dx en el servicio


            Sigesoft.Node.WinClient.BE.DiagnosticRepositoryList        _diagnosticRepository      = new Sigesoft.Node.WinClient.BE.DiagnosticRepositoryList();
            List <Sigesoft.Node.WinClient.BE.DiagnosticRepositoryList> _ListadiagnosticRepository = new List <Sigesoft.Node.WinClient.BE.DiagnosticRepositoryList>();

            _diagnosticRepository.v_DiagnosticRepositoryId = Guid.NewGuid().ToString();
            _diagnosticRepository.v_DiseasesId             = Session["DiseasesId"] == null ? objDiseaseDto.v_DiseasesId : Session["DiseasesId"].ToString();
            _diagnosticRepository.i_AutoManualId           = 1;
            _diagnosticRepository.i_PreQualificationId     = 1;
            _diagnosticRepository.i_FinalQualificationId   = (int)FinalQualification.Definitivo;
            _diagnosticRepository.i_DiagnosticTypeId       = (int)TipoDx.Enfermedad_Comun;

            _diagnosticRepository.v_ServiceId    = Session["ServiceId"].ToString();
            _diagnosticRepository.v_ComponentId  = ddlExamen.SelectedValue.ToString(); //_componentId;
            _diagnosticRepository.v_DiseasesName = objDiseaseDto.v_Name;
            _diagnosticRepository.i_RecordStatus = (int)RecordStatus.Agregado;
            _diagnosticRepository.i_RecordType   = (int)RecordType.Temporal;
            _diagnosticRepository.Restrictions   = null;
            _diagnosticRepository.Recomendations = null;

            _ListadiagnosticRepository.Add(_diagnosticRepository);

            oServiceBL.AddDiagnosticRepository(ref objOperationResult, _ListadiagnosticRepository, null, ((ClientSession)Session["objClientSession"]).GetAsList(), true);

            if (objOperationResult.Success == 1)  // Operación sin error
            {
                // Cerrar página actual y hacer postback en el padre para actualizar
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
            }
            else  // Operación con error
            {
                Alert.ShowInTop("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage);
                // Se queda en el formulario.
            }
        }
        /// <summary>
        /// 绑定UI元素
        /// </summary>
        /// <param name="seatNo"></param>
        /// <param name="seatShortNo"></param>GetBespeakLogInfoBySeatNo
        void BindUIElement(string seatNo, string seatShortNo, DateTime date)
        {
            SeatManage.ClassModel.ReadingRoomInfo room           = SeatManage.Bll.T_SM_ReadingRoom.GetSingleRoomInfo(roomNo);
            SeatManage.Bll.T_SM_ReadingRoom       bllReadingRoom = new SeatManage.Bll.T_SM_ReadingRoom();
            foreach (DateTime dt in room.Setting.SeatBespeak.SpecifiedTimeList)
            {
                DropDownList_Time.Items.Add(new FineUI.ListItem(dt.ToShortTimeString(), dt.ToShortTimeString()));
            }
            DateTime minTime = DateTime.Parse(date.ToShortDateString() + " " + bllReadingRoom.GetRoomOpenTimeByDate(room.Setting, date.ToShortDateString()).BeginTime);

            while (true)
            {
                minTime = minTime.AddMinutes(10);
                if (minTime.Date > date.Date)
                {
                    break;
                }
                if (Code.NowReadingRoomState.ReadingRoomOpenState(room.Setting.RoomOpenSet, minTime) == SeatManage.EnumType.ReadingRoomStatus.Close)
                {
                    continue;
                }
                DropDownList_FreeTime.Items.Add(new FineUI.ListItem(minTime.ToShortTimeString(), minTime.ToShortTimeString()));
            }
            if (!room.Setting.SeatBespeak.SpecifiedBespeak)
            {
                rblModel.Hidden = true;
            }
            if (rblModel.SelectedValue == "0")
            {
                DropDownList_FreeTime.Hidden = true;
                DropDownList_Time.Hidden     = true;
            }
            else
            {
                if (!room.Setting.SeatBespeak.SpecifiedTime)
                {
                    DropDownList_Time.Hidden     = true;
                    DropDownList_FreeTime.Hidden = false;
                }
                else
                {
                    DropDownList_FreeTime.Hidden = true;
                    DropDownList_Time.Hidden     = false;
                }
            }
            lblbeginDate.Text     = date.ToShortDateString();
            this.lblSeatNo.Text   = seatShortNo;
            this.lblRoomName.Text = room.Name;
            //判断自己是否已经预约座位
            List <SeatManage.EnumType.BookingStatus> bespeakStatus = new List <SeatManage.EnumType.BookingStatus>();

            bespeakStatus.Add(SeatManage.EnumType.BookingStatus.Waiting);
            List <SeatManage.ClassModel.BespeakLogInfo> readerBespeaklist = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakLogInfoByCardNo(this.LoginId, date);//.GetBespeakList(this.LoginId, null, date, 0, bespeakStatus);

            if (readerBespeaklist.Count > 0)
            {
                FineUI.Alert.ShowInTop("您选择的日期已经预约了座位,请先取消原来的预约。");
                btnBespeak.Enabled = false;
                PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                return;
            }
            //判断座位是否被别人预约
            List <SeatManage.ClassModel.BespeakLogInfo> list = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakLogInfoBySeatNo(seatNo, date);

            roomOpenTime.Value   = bllReadingRoom.GetRoomOpenTimeByDate(room.Setting, date.ToShortDateString()).BeginTime;
            this.lblEndDate.Text = bespeakSureTimeSpan(room.Setting);
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].BsepeakState == SeatManage.EnumType.BookingStatus.Waiting)
                {
                    FineUI.Alert.ShowInTop("座位已经被别人预约,请预约其他座位");
                    btnBespeak.Enabled = false;
                    PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                    return;
                }
            }
            //判断是否已加入黑名单
            List <SeatManage.ClassModel.BlackListInfo> blacklistInfoByCardNo = SeatManage.Bll.T_SM_Blacklist.GetBlackListInfo(this.LoginId);

            SeatManage.ClassModel.RegulationRulesSetting rulesSet = SeatManage.Bll.T_SM_SystemSet.GetRegulationRulesSetting();
            if (room.Setting.UsedBlacklistLimit && blacklistInfoByCardNo.Count > 0)
            {
                if (room.Setting.BlackListSetting.Used)
                {
                    bool isblack = false;
                    foreach (SeatManage.ClassModel.BlackListInfo blinfo in blacklistInfoByCardNo)
                    {
                        if (blinfo.ReadingRoomID == room.No)
                        {
                            isblack = true;
                            break;
                        }
                    }
                    if (isblack)
                    {
                        FineUI.Alert.ShowInTop("你已进入黑名单,不能在该阅览室预约座位");
                        PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                        return;
                    }
                }
                else
                {
                    FineUI.Alert.ShowInTop("你已进入黑名单,不能在该阅览室预约座位");
                    PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                    return;
                }
            }
            if (room.Setting.LimitReaderEnter.Used)
            {
                SeatManage.ClassModel.ReaderInfo readerInfo = SeatManage.Bll.EnterOutOperate.GetReaderInfo(this.LoginId);
                string[] litype = room.Setting.LimitReaderEnter.ReaderTypes.Split(';');
                if (!room.Setting.LimitReaderEnter.CanEnter)
                {
                    foreach (string type in litype)
                    {
                        if (type == readerInfo.ReaderType)
                        {
                            FineUI.Alert.ShowInTop("你的读者类型不能在该阅览室预约座位");
                            PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                            return;
                        }
                    }
                }
                else
                {
                    bool isintype = false;
                    foreach (string type in litype)
                    {
                        if (type == readerInfo.ReaderType)
                        {
                            isintype = true;
                            break;
                        }
                    }
                    if (!isintype)
                    {
                        FineUI.Alert.ShowInTop("你的读者类型不能在该阅览室预约座位");
                        PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                        return;
                    }
                }
            }

            btnBespeak.Enabled = true;
        }
コード例 #18
0
        /// <summary>
        /// 提交设置
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Request.QueryString["Type"] != null && Request.QueryString["id"] != null)
            {
                if (!string.IsNullOrEmpty(txtpw1.Text) && !string.IsNullOrEmpty(txtpw2.Text))
                {
                    //密码是Juneberry_NJZBWX
                    if (txtpw1.Text == txtpw2.Text && SeatManage.SeatManageComm.MD5Algorithm.GetMD5Str32(txtpw2.Text) == "88C5884397D51468FA04ACFA46483AE4")
                    {
                        FineUI.Alert.Show("验证成功!");
                        PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHidePostBackReference());
                        switch (Request.QueryString["Type"])
                        {
                        case "School":
                            SeatManage.ClassModel.School school = new SeatManage.ClassModel.School();
                            school.No = Request.QueryString["id"];
                            if (!SeatManage.Bll.T_SM_School.DeleteSchool(school))
                            {
                                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                                FineUI.Alert.ShowInTop("删除失败!");
                            }
                            else
                            {
                                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                                FineUI.Alert.ShowInTop("删除完成!");
                            } break;

                        case "Library":
                            SeatManage.ClassModel.LibraryInfo library = new SeatManage.ClassModel.LibraryInfo();
                            library.No = Request.QueryString["id"];
                            if (!SeatManage.Bll.T_SM_Library.DeleteLibrary(library))
                            {
                                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                                FineUI.Alert.ShowInTop("删除失败!");
                            }
                            else
                            {
                                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                                FineUI.Alert.ShowInTop("删除完成!");
                            }
                            break;

                        case "ReadingRoom":
                            SeatManage.ClassModel.ReadingRoomInfo room = new SeatManage.ClassModel.ReadingRoomInfo();
                            room.No = Request.QueryString["id"];
                            if (!SeatManage.Bll.T_SM_ReadingRoom.DeleteReadingRoom(room))
                            {
                                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                                FineUI.Alert.ShowInTop("删除失败!");
                            }
                            else
                            {
                                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                                FineUI.Alert.ShowInTop("删除完成!");
                            }
                            break;
                        }
                    }
                    else
                    {
                        PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                        FineUI.Alert.ShowInTop("密码错误!");
                    }
                }
                else
                {
                    PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                    FineUI.Alert.ShowInTop("密码不能为空!");
                    return;
                }
            }
            else
            {
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                FineUI.Alert.ShowInTop("加载页面失败,请重新打开");
            }
        }
コード例 #19
0
        /// <summary>
        /// 加载页面
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var thisunit = BLL.CommonService.GetIsThisUnit();
                if (thisunit != null && !string.IsNullOrEmpty(thisunit.UnitCode))
                {
                    string url = "../Images/SUBimages/" + thisunit.UnitCode + ".gif";
                    if (url.Contains('*'))
                    {
                        url = url.Replace('*', '-');
                    }
                    this.image.Src = url;
                }

                this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
                this.AccidentReportOtherId  = Request.Params["AccidentReportOtherId"];
                if (!string.IsNullOrEmpty(this.AccidentReportOtherId))
                {
                    Model.Accident_AccidentReportOther accidentReportOther = BLL.AccidentReportOtherService.GetAccidentReportOtherById(this.AccidentReportOtherId);
                    if (accidentReportOther != null)
                    {
                        Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(accidentReportOther.ProjectId);
                        if (project != null)
                        {
                            this.lblProjectName.Text = project.ProjectName;
                            this.lblProjectCode.Text = project.ProjectCode;
                        }
                        this.txtAccidentReportOtherCode.Text = accidentReportOther.AccidentReportOtherCode;
                        if (!string.IsNullOrEmpty(accidentReportOther.AccidentTypeId))
                        {
                            Model.Sys_Const c = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_AccidentInvestigationProcessingReport).FirstOrDefault(x => x.ConstValue == accidentReportOther.AccidentTypeId);
                            if (c != null)
                            {
                                this.txtAccidentTypeName.Text = c.ConstText;
                            }
                        }
                        this.txtAbstract.Text = accidentReportOther.Abstract;
                        if (accidentReportOther.AccidentDate != null)
                        {
                            this.txtAccidentDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReportOther.AccidentDate);
                        }
                        this.txtWorkAreaName.Text = accidentReportOther.WorkArea;
                    }
                    if (accidentReportOther.PeopleNum != null)
                    {
                        this.txtPeopleNum.Text = Convert.ToString(accidentReportOther.PeopleNum);
                    }
                    if (!string.IsNullOrEmpty(accidentReportOther.UnitId))
                    {
                        var unit = BLL.UnitService.GetUnitByUnitId(accidentReportOther.UnitId);
                        if (unit != null)
                        {
                            this.txtUnitName.Text = unit.UnitName;
                        }
                    }

                    if (accidentReportOther.EconomicLoss != null)
                    {
                        this.txtEconomicLoss.Text = Convert.ToString(accidentReportOther.EconomicLoss);
                    }
                    if (accidentReportOther.EconomicOtherLoss != null)
                    {
                        this.txtEconomicOtherLoss.Text = Convert.ToString(accidentReportOther.EconomicOtherLoss);
                    }
                    this.txtReportMan.Text    = accidentReportOther.ReportMan;
                    this.txtReporterUnit.Text = accidentReportOther.ReporterUnit;
                    if (accidentReportOther.ReportDate != null)
                    {
                        this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReportOther.ReportDate);
                    }
                    this.txtProcessDescription.Text   = accidentReportOther.ProcessDescription;
                    this.txtEmergencyMeasures.Text    = accidentReportOther.EmergencyMeasures;
                    this.txtImmediateCause.Text       = accidentReportOther.ImmediateCause;
                    this.txtIndirectReason.Text       = accidentReportOther.IndirectReason;
                    this.txtCorrectivePreventive.Text = accidentReportOther.CorrectivePreventive;
                    if (!string.IsNullOrEmpty(accidentReportOther.CompileMan))
                    {
                        var user = BLL.UserService.GetUserByUserId(accidentReportOther.CompileMan);
                        if (user != null)
                        {
                            this.txtCompileManName.Text = user.UserName;
                        }
                    }
                    if (accidentReportOther.CompileDate != null)
                    {
                        this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", accidentReportOther.CompileDate);
                    }
                }
                BindGrid();
            }
        }
コード例 #20
0
 protected void TreeDpt_NodeCommand(object sender, FineUIPro.TreeCommandEventArgs e)
 {
     if (!string.IsNullOrEmpty(Request.QueryString["dptId"]))
     {
         string            dptId = Request.QueryString["dptId"];
         Model.tDepartMent m     = BLL.GetModel(Convert.ToInt32(dptId));
         if (e.NodeID == m.dptId.ToString())
         {
             return;
         }
     }
     PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(e.Node.NodeID, e.Node.Text) + ActiveWindow.GetHideReference());
 }
コード例 #21
0
 protected void btnSaveClose_Click(object sender, EventArgs e)
 {
     SaveItem();
     PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
 }
コード例 #22
0
        /// <summary>
        /// 将Dataset的数据导入数据库
        /// </summary>
        /// <param name="pds">数据集</param>
        /// <param name="Cols">数据集列数</param>
        /// <returns></returns>
        private bool AddDatasetToSQL(DataTable pds, int Cols)
        {
            int ic, ir;

            reports.Clear();
            ic = pds.Columns.Count;
            if (ic < Cols)
            {
                ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
            }

            ir = pds.Rows.Count;
            if (pds != null && ir > 0)
            {
                var units = from x in Funs.DB.Base_Unit select x;

                for (int i = 1; i < ir; i++)
                {
                    Model.View_Information_DrillConductedQuarterlyReportItem report = new Model.View_Information_DrillConductedQuarterlyReportItem();
                    string row1  = pds.Rows[i][0].ToString().Trim();
                    string row2  = pds.Rows[i][1].ToString().Trim();
                    string row3  = pds.Rows[i][2].ToString().Trim();
                    string row4  = pds.Rows[i][3].ToString().Trim();
                    string row5  = pds.Rows[i][4].ToString().Trim();
                    string row6  = pds.Rows[i][5].ToString().Trim();
                    string row7  = pds.Rows[i][6].ToString().Trim();
                    string row8  = pds.Rows[i][7].ToString().Trim();
                    string row9  = pds.Rows[i][8].ToString().Trim();
                    string row10 = pds.Rows[i][9].ToString().Trim();
                    string row11 = pds.Rows[i][10].ToString().Trim();
                    string row12 = pds.Rows[i][11].ToString().Trim();
                    string row13 = pds.Rows[i][12].ToString().Trim();
                    string row14 = pds.Rows[i][13].ToString().Trim();
                    string row15 = pds.Rows[i][14].ToString().Trim();
                    string row16 = pds.Rows[i][15].ToString().Trim();
                    string row17 = pds.Rows[i][16].ToString().Trim();
                    string row18 = pds.Rows[i][17].ToString().Trim();
                    string row19 = pds.Rows[i][18].ToString().Trim();
                    if (!string.IsNullOrEmpty(row1))
                    {
                        report.UnitId = units.Where(x => x.UnitName == row1.Trim()).FirstOrDefault().UnitId;
                    }
                    if (!string.IsNullOrEmpty(row2))
                    {
                        report.YearId = Convert.ToInt32(row2);
                    }
                    if (!string.IsNullOrEmpty(row3))
                    {
                        report.Quarter = Convert.ToInt32(row3);
                    }
                    report.IndustryType = row4;
                    if (!string.IsNullOrEmpty(row5))
                    {
                        report.TotalConductCount = Convert.ToInt32(row5);
                    }
                    if (!string.IsNullOrEmpty(row6))
                    {
                        report.TotalPeopleCount = Convert.ToInt32(row6);
                    }
                    if (!string.IsNullOrEmpty(row7))
                    {
                        report.TotalInvestment = Convert.ToDecimal(row7);
                    }
                    if (!string.IsNullOrEmpty(row8))
                    {
                        report.HQConductCount = Convert.ToInt32(row8);
                    }
                    if (!string.IsNullOrEmpty(row9))
                    {
                        report.HQPeopleCount = Convert.ToInt32(row9);
                    }
                    if (!string.IsNullOrEmpty(row10))
                    {
                        report.HQInvestment = Convert.ToDecimal(row10);
                    }
                    if (!string.IsNullOrEmpty(row11))
                    {
                        report.BasicConductCount = Convert.ToInt32(row11);
                    }
                    if (!string.IsNullOrEmpty(row12))
                    {
                        report.BasicPeopleCount = Convert.ToInt32(row12);
                    }
                    if (!string.IsNullOrEmpty(row13))
                    {
                        report.BasicInvestment = Convert.ToDecimal(row13);
                    }
                    if (!string.IsNullOrEmpty(row14))
                    {
                        report.ComprehensivePractice = Convert.ToInt32(row14);
                    }
                    if (!string.IsNullOrEmpty(row15))
                    {
                        report.CPScene = Convert.ToInt32(row15);
                    }
                    if (!string.IsNullOrEmpty(row16))
                    {
                        report.CPDesktop = Convert.ToInt32(row16);
                    }
                    if (!string.IsNullOrEmpty(row17))
                    {
                        report.SpecialDrill = Convert.ToInt32(row17);
                    }
                    if (!string.IsNullOrEmpty(row18))
                    {
                        report.SDScene = Convert.ToInt32(row18);
                    }
                    if (!string.IsNullOrEmpty(row19))
                    {
                        report.SDDesktop = Convert.ToInt32(row19);
                    }

                    if (reports.Where(e => e.DrillConductedQuarterlyReportItemId == report.DrillConductedQuarterlyReportItemId).FirstOrDefault() == null)
                    {
                        report.DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.View_Information_DrillConductedQuarterlyReportItem));
                        reports.Add(report);
                    }
                }
                Session["reports"] = reports;
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
            }
            else
            {
                ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
            }
            return(true);
        }
コード例 #23
0
ファイル: Add_Students.aspx.cs プロジェクト: 15831944/C-12-
 //保存
 protected void Save_Click(object sender, EventArgs e)
 {
     try
     {
         if (T_UserInfoID.Text.Trim() != "")
         {
             if (bllUser.IsUser(T_UserInfoID.Text.Trim()) != null)
             {
                 if (bllUser.IsUser(T_UserInfoID.Text.Trim()).IsPass == true)
                 {
                     if (T_Sno.Text.Trim() == "")
                     {
                         Alert.ShowInTop("学号不能为空!");
                         T_Sno.Text = "";
                         return;
                     }
                     if (T_SName.Text.Trim() == "")
                     {
                         Alert.ShowInTop("姓名不能为空!");
                         T_SName.Text = "";
                         return;
                     }
                     if (T_Specialty.Text.Trim() == "")
                     {
                         Alert.ShowInTop("专业不能为空!");
                         T_Specialty.Text = "";
                         return;
                     }
                     if (T_SResearch.Text.Trim() == "")
                     {
                         Alert.ShowInTop("研究方向不能为空!");
                         T_SResearch.Text = "";
                         return;
                     }
                     if (bllStudent.IsSnoAndTeacher(T_Sno.Text.Trim(), Convert.ToInt32(bllUser.FindID(T_UserInfoID.Text.Trim().ToString()))) == null)
                     {
                         Student newstudent = new Student();
                         newstudent.Sno   = T_Sno.Text.Trim();
                         newstudent.Sname = T_SName.Text.Trim();
                         if (rbtnBoy.Checked == true)
                         {
                             newstudent.Sex = true;
                         }
                         else
                         {
                             newstudent.Sex = false;
                         }
                         newstudent.DocumentType   = DropDownListDocumentType.SelectedItem.Text;
                         newstudent.DocumentNumber = T_DocumentNumber.Text.Trim();
                         newstudent.Contact        = T_Contact.Text.Trim();
                         if (IsGraduation.Checked == true)
                         {
                             newstudent.IsGraduation = true;
                         }
                         else
                         {
                             newstudent.IsGraduation = false;
                         }
                         newstudent.Specialty            = T_Specialty.Text.Trim();
                         newstudent.SResearch            = T_SResearch.Text.Trim();
                         newstudent.SGraduationDirection = T_SGraduationDirection.Text.Trim();
                         newstudent.Type       = DropDownListType.SelectedItem.Text;
                         newstudent.UserInfoID = bllUser.FindID(T_UserInfoID.Text);
                         newstudent.EnterTime  = DatePickerEnterTime.SelectedDate;
                         newstudent.AgencyID   = BLLAgency.SelectAgencyID(DropDownList_Agency.SelectedText);
                         if (DatePickerGraduationTime.SelectedDate.HasValue)
                         {
                             if (DatePickerGraduationTime.SelectedDate < DatePickerEnterTime.SelectedDate)
                             {
                                 Alert.ShowInTop("毕业时间不能小于入学时间!");
                                 return;
                             }
                             else
                             {
                                 newstudent.GraduationTime = DatePickerGraduationTime.SelectedDate;
                             }
                         }
                         newstudent.SecrecyLevel = DropDownListSecrecyLevel.SelectedIndex + 1;
                         newstudent.EntryPerson  = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName;
                         if (Convert.ToInt32(Session["SecrecyLevel"]) != 5)
                         {
                             newstudent.IsPass = false;
                             bllStudent.InsertForPeople(newstudent);//插入学生情况表
                             OperationLog operate = new OperationLog();
                             operate.LoginName        = bllUser.FindByLoginName(Session["LoginName"].ToString()).UserName;
                             operate.LoginIP          = "";
                             operate.OperationType    = "添加";
                             operate.OperationContent = "Student";
                             operate.OperationDataID  = bllStudent.SelectByStudentID(newstudent.Sno);
                             operate.OperationTime    = System.DateTime.Now;
                             operate.Remark           = "";
                             bllOperate.Insert(operate);//插入操作表
                             PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("学生情况信息已提交审核!"));
                         }
                         else
                         {
                             newstudent.IsPass = true;
                             bllStudent.InsertForPeople(newstudent);//插入学生情况表
                             PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("学生情况信息已添加完成!"));
                         }
                     }
                     else
                     {
                         Alert.ShowInTop("已存在学号为" + T_Sno.Text + ", 授课老师为" + T_UserInfoID.Text + "的信息");
                         T_Sno.Text = "";
                     }
                 }
                 else
                 {
                     Alert.ShowInTop("授课老师尚未通过审核!");
                 }
             }
             else
             {
                 Alert.ShowInTop("授课老师不存在!");
                 T_UserInfoID.Text = "";
             }
         }
         else
         {
             Alert.ShowInTop("授课老师不能为空!");
             T_UserInfoID.Text = "";
             return;
         }
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
コード例 #24
0
ファイル: selectUser.aspx.cs プロジェクト: yykxia/OA
        protected void btn_sub_Click(object sender, EventArgs e)
        {
            try
            {
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < Grid1.Rows.Count; i++)
                {
                    String userId = Grid1.DataKeys[i][0].ToString();

                    String selectedName = Grid1.Rows[i].Values[0].ToString();

                    sb.AppendFormat("{0}-{1};", userId, selectedName);
                }
                PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(sb.ToString()) + ActiveWindow.GetHideReference());
            }
            catch (Exception ex)
            {
                Alert.ShowInTop(ex.Message);
            }
        }
コード例 #25
0
ファイル: ModuleInstaller.aspx.cs プロジェクト: publicwmh/eas
 protected void btnClose_Click(object sender, EventArgs e)
 {
     PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
 }
コード例 #26
0
        protected void btnSaveRefresh_Click(object sender, EventArgs e)
        {
            string          Mode = Request.QueryString["Mode"].ToString();
            OperationResult objOperationResult = new OperationResult();

            if (Mode == "New")
            {
                // Create the entity
                datahierarchyDto objEntity = new datahierarchyDto();

                // Populate the entity
                objEntity.i_GroupId      = int.Parse(txtGroupId.Text.Trim());
                objEntity.i_ItemId       = int.Parse(txtParameterId.Text.Trim());
                objEntity.v_Value1       = txtDescription.Text.Trim().ToUpper();
                objEntity.v_Value2       = txtDescription2.Text.Trim().ToUpper();
                objEntity.v_Field        = txtField.Text.Trim().ToUpper();
                objEntity.i_ParentItemId = -1;

                // Obtener el usuario autenticado
                int intUserPersonId = ((ClientSession)Session["objClientSession"]).i_SystemUserId;
                //Validar si la Clave primaria ya existe.
                if (_objBL.GetDataHierarchy(ref objOperationResult, objEntity.i_GroupId, objEntity.i_ItemId) != null)
                {
                    Alert.Show("La clave primaria ya existe!", MessageBoxIcon.Warning);
                    return;
                }
                else
                {
                    // Save the data
                    _objBL.AddDataHierarchy(ref objOperationResult, objEntity, ((ClientSession)Session["objClientSession"]).GetAsList());
                }
            }
            else if (Mode == "Edit")
            {
                // Obtener el usuario autenticado
                int intUserPersonId = ((ClientSession)Session["objClientSession"]).i_SystemUserId;

                // Get the entity from the session
                datahierarchyDto objEntity = (datahierarchyDto)Session["objEntity"];

                // Populate the entity
                objEntity.i_GroupId = int.Parse(txtGroupId.Text.Trim());
                objEntity.i_ItemId  = int.Parse(txtParameterId.Text.Trim());
                objEntity.v_Value1  = txtDescription.Text.Trim().ToUpper();
                if (txtUserInterfaceOrder.Text == "")
                {
                    objEntity.i_Sort = null;
                }
                else
                {
                    objEntity.i_Sort = int.Parse(txtUserInterfaceOrder.Text.Trim());
                }
                objEntity.v_Value2       = txtDescription2.Text.Trim().ToUpper();
                objEntity.v_Field        = txtField.Text.Trim().ToUpper();
                objEntity.i_ParentItemId = Int32.Parse(ddlParentItemId.SelectedValue);

                // Save the data
                _objBL.UpdateDataHierarchy(ref objOperationResult, objEntity, ((ClientSession)Session["objClientSession"]).GetAsList());
            }
            else if (Mode == "NewChildren")
            {
                // Obtener el usuario autenticado
                //int intUserPersonId = ((ClientSession)Session["objClientSession"]).i_SystemUserId;

                // Create the entity
                datahierarchyDto objEntity = new datahierarchyDto();

                // Populate the entity
                objEntity.i_GroupId = int.Parse(txtGroupId.Text.Trim());
                objEntity.i_ItemId  = int.Parse(txtParameterId.Text.Trim());
                objEntity.v_Value1  = txtDescription.Text.Trim().ToUpper();
                if (txtUserInterfaceOrder.Text == "")
                {
                    objEntity.i_Sort = null;
                }
                else
                {
                    objEntity.i_Sort = int.Parse(txtUserInterfaceOrder.Text.Trim());
                }
                objEntity.v_Value2       = txtDescription2.Text.Trim().ToUpper();
                objEntity.v_Field        = txtField.Text.Trim().ToUpper();
                objEntity.i_ParentItemId = Int32.Parse(ddlParentItemId.SelectedValue);

                if (_objBL.GetDataHierarchy(ref objOperationResult, objEntity.i_GroupId, objEntity.i_ItemId) != null)
                {
                    Alert.Show("¡La clave primaria ya existe!", MessageBoxIcon.Warning);
                    return;
                }
                else
                {
                    // Save the data
                    _objBL.AddDataHierarchy(ref objOperationResult, objEntity, ((ClientSession)Session["objClientSession"]).GetAsList());
                }
            }
            //Analizar el resultado de la operación
            if (objOperationResult.Success == 1)  // Operación sin error
            {
                // Cerrar página actual y hacer postback en el padre para actualizar
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
            }
            else  // Operación con error
            {
                Alert.ShowInTop("Error en operación:" + System.Environment.NewLine + objOperationResult.ExceptionMessage);
                // Se queda en el formulario.
            }
        }
コード例 #27
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            DateTime dt;
            string   errMsg = "";
            string   oxh    = this.lblXhOld.Text.Trim();
            string   oxm    = this.lblXmOld.Text.Trim();
            string   osj    = this.lblSjhmOld.Text.Trim();

            Model.Jcgl.Jc_xs xs = TU.Common.ConvertHelper.ConvertToEntity <Model.Jcgl.Jc_xs>("SimpleForm1", "SimpleForm2", "SimpleForm3", "SimpleForm4");
            xs.Pkid = Pkid;
            xs.Bmbh = TStar.Web.Globals.Account.DeptPkid;

            // 基本信息
            if (String.IsNullOrEmpty(xs.Xh))
            {
                errMsg += "请输入学号 !\n";
            }
            else if (BLL.Jcgl.Jc_xs.IsRepeated(xs.Pkid, "Xh", xs.Xh))
            {
                errMsg += "该学生已存在 !\n";
            }
            if (String.IsNullOrEmpty(xs.Xm))
            {
                errMsg += "请输入姓名 !\n";
            }
            if (xs.Dzbbh == "__")
            {
                errMsg += "请选择党支部 !\n";
            }
            if (xs.Zybh == "__")
            {
                errMsg += "请选择专业 !\n";
            }
            if (xs.Bjbh == "__")
            {
                errMsg += "请选择班级 !\n";
            }
            if (xs.Xbdm == "__")
            {
                errMsg += "请选择性别 !\n";
            }
            if (String.IsNullOrEmpty(xs.Sfzh))
            {
                errMsg += "请输入身份证号 !\n";
            }
            else if (xs.Sfzh.Length != 18)
            {
                errMsg += "身份证号长度不正确 !\n";
            }
            else if (BLL.Jcgl.Jc_xs.IsRepeated(xs.Pkid, "Sfzh", xs.Sfzh))
            {
                errMsg += "身份证号已存在 !\n";
            }
            else
            {
                int jcxb = int.Parse(xs.Sfzh[16].ToString());
                if (xs.Xbdm == "1" && jcxb % 2 == 0 || xs.Xbdm == "2" && jcxb % 2 == 1)
                {
                    errMsg += "身份证号的性别位不正确 !\n";
                }

                xs.Csrq = string.Format("{0}.{1}.{2}", xs.Sfzh.Substring(6, 4), xs.Sfzh.Substring(10, 2), xs.Sfzh.Substring(12, 2));
                if (!DateTime.TryParse(xs.Csrq, out dt))
                {
                    errMsg += "身份证号的出生日期位不正确 !\n";
                }
            }
            if (String.IsNullOrEmpty(xs.Sjhm))
            {
                errMsg += "请输入手机号码 !\n";
            }
            if (String.IsNullOrEmpty(xs.Mz))
            {
                errMsg += "请输入民族 !\n";
            }
            if (String.IsNullOrEmpty(xs.Jg))
            {
                errMsg += "请输入籍贯 !\n";
            }
            if (String.IsNullOrEmpty(xs.Zw))
            {
                errMsg += "请输入职务 !\n";
            }
            if (String.IsNullOrEmpty(xs.Jtdz))
            {
                errMsg += "请输入家庭地址 !\n";
            }
            // 发展前信息
            if (String.IsNullOrEmpty(xs.Sqrdrq))
            {
                errMsg += "请输入申请入党日期 !\n";
            }
            else if (!DateTime.TryParse(xs.Sqrdrq, out dt))
            {
                errMsg += "申请入党日期不正确 !\n";
            }
            if (String.IsNullOrEmpty(xs.Jjfzrq))
            {
                errMsg += "请输入积极分子日期 !\n";
            }
            else if (!DateTime.TryParse(xs.Jjfzrq, out dt))
            {
                errMsg += "积极分子日期不正确 !\n";
            }
            if (xs.Rdlxrbh1 == "__")
            {
                errMsg += "请选择入党联系人 !\n";
            }
            // 发展后信息
            if (!this.gplFzh.Hidden)
            {
                xs.Rdrq  = this.tbxRdrq.Text.Trim();
                xs.Zysbh = this.tbxZysbh.Text.Trim();
                xs.Zzrq  = this.tbxZzrq.Text.Trim();

                if (String.IsNullOrEmpty(xs.Rdrq))
                {
                    errMsg += "请输入入党日期 !\n";
                }
                else if (!DateTime.TryParse(xs.Rdrq, out dt))
                {
                    errMsg += "入党日期不正确 !\n";
                }
                if (String.IsNullOrEmpty(xs.Zysbh))
                {
                    errMsg += "请输入志愿书编号 !\n";
                }
                else if (BLL.Jcgl.Jc_xs.IsRepeated(xs.Pkid, "Zysbh", xs.Zysbh))
                {
                    errMsg += "志愿书编号已存在 !\n";
                }
                if (String.IsNullOrEmpty(xs.Zzrq))
                {
                    if (((int)TStar.Web.Globals.SystemSetting.Fzzt.Zsdy).ToString() == xs.Fzztdm)
                    {
                        errMsg += "请输入转正日期 !\n";
                    }
                }
                else if (!DateTime.TryParse(xs.Zzrq, out dt))
                {
                    errMsg += this.tbxZzrq.Label.Replace(" ", "") + "不正确 !\n";
                }
            }
            if (errMsg.Length > 0)
            {
                Alert.Show(errMsg, "保存提示", MessageBoxIcon.Warning);
                return;
            }

            try
            {
                if (BLL.Jcgl.Jc_xs.Update(xs, xs.Xh != oxh || xs.Xm != oxm || xs.Sjhm != osj))
                {
                    PageContext.RegisterStartupScript(Alert.GetShowInParentReference("保存成功 !", "操作完成", MessageBoxIcon.Information) + ActiveWindow.GetHidePostBackReference());
                }
                else
                {
                    Alert.Show("未成功保存,请与管理员联系 !", "保存失败", MessageBoxIcon.Warning);
                }
            }
            catch (Exception err)
            {
                Alert.Show(err.Message, "保存失败", MessageBoxIcon.Error);
            }
        }
コード例 #28
0
 /// <summary>
 /// 加载页面
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         this.ProjectId = this.CurrUser.LoginProjectId;
         this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
         this.hdProjectA1.Text       = "0";
         this.hdProjectA2.Text       = "0";
         this.hdProjectA3.Text       = "0";
         this.hdProjectA4.Text       = "0";
         this.hdProjectA5.Text       = "0";
         this.hdProjectA6.Text       = "0";
         this.hdProjectB1.Text       = "0";
         this.hdProjectB2.Text       = "0";
         this.hdProjectB3.Text       = "0";
         this.InitDropDownList();
         this.ExpenseId = Request.Params["ExpenseId"];
         if (!string.IsNullOrEmpty(this.ExpenseId))
         {
             Model.CostGoods_Expense expense = BLL.ExpenseService.GetExpenseById(this.ExpenseId);
             if (expense != null)
             {
                 this.ProjectId = expense.ProjectId;
                 if (this.ProjectId != this.CurrUser.LoginProjectId)
                 {
                     this.InitDropDownList();
                 }
                 if (expense.Months != null)
                 {
                     //this.txtMonths.Text = string.Format("{0:yyyy-MM}", expense.Months);
                     this.drpYear.SelectedValue   = Convert.ToString(expense.Months.Value.Year);
                     this.drpMonths.SelectedValue = Convert.ToString(expense.Months.Value.Month);
                 }
                 this.txtExpenseCode.Text = CodeRecordsService.ReturnCodeByDataId(this.ExpenseId);
                 if (!string.IsNullOrEmpty(expense.UnitId))
                 {
                     this.drpUnitId.SelectedValue = expense.UnitId;
                 }
                 if (expense.ReportDate != null)
                 {
                     this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", expense.ReportDate);
                 }
                 //this.txtCompileMan.Text = expense.CompileMan;
                 //if (expense.CompileDate != null)
                 //{
                 //    this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", expense.CompileDate);
                 //}
                 //this.txtCheckMan.Text = expense.CheckMan;
                 //if (expense.CheckDate != null)
                 //{
                 //    this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", expense.CheckDate);
                 //}
                 //this.txtApproveMan.Text = expense.ApproveMan;
                 //if (expense.ApproveDate != null)
                 //{
                 //    this.txtApproveDate.Text = string.Format("{0:yyyy-MM-dd}", expense.ApproveDate);
                 //}
                 decimal            totalA = 0, totalB = 0, totalProjectA = 0, totalProjectB = 0;
                 Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.ProjectId);
                 List <Model.CostGoods_ExpenseDetail> projectDetails = BLL.ExpenseDetailService.GetCostDetailsByUnitId(expense.UnitId, project != null ? Convert.ToDateTime(project.StartDate) : Convert.ToDateTime("2000-01-01"), Convert.ToDateTime(expense.Months));
                 List <Model.CostGoods_ExpenseDetail> details        = BLL.ExpenseDetailService.GetExpenseDetailsByExpenseId(this.ExpenseId);
                 Model.CostGoods_ExpenseDetail        a1             = details.FirstOrDefault(x => x.CostType == "A1");
                 this.hdProjectA1.Text = (from x in projectDetails where x.CostType == "A1" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectA2.Text = (from x in projectDetails where x.CostType == "A2" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectA3.Text = (from x in projectDetails where x.CostType == "A3" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectA4.Text = (from x in projectDetails where x.CostType == "A4" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectA5.Text = (from x in projectDetails where x.CostType == "A5" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectA6.Text = (from x in projectDetails where x.CostType == "A6" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectB1.Text = (from x in projectDetails where x.CostType == "B1" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectB2.Text = (from x in projectDetails where x.CostType == "B2" select x.CostMoney ?? 0).Sum().ToString();
                 this.hdProjectB3.Text = (from x in projectDetails where x.CostType == "B3" select x.CostMoney ?? 0).Sum().ToString();
                 if (a1 != null)
                 {
                     this.nbA1.Text        = (a1.CostMoney ?? 0).ToString();
                     totalA               += Funs.GetNewDecimalOrZero(this.nbA1.Text);
                     this.nbProjectA1.Text = ((from x in projectDetails where x.CostType == "A1" select x.CostMoney ?? 0).Sum() + a1.CostMoney ?? 0).ToString();
                     totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA1.Text);
                     this.txtDefA1.Text    = a1.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail a2 = details.FirstOrDefault(x => x.CostType == "A2");
                 if (a2 != null)
                 {
                     this.nbA2.Text        = (a2.CostMoney ?? 0).ToString();
                     totalA               += Funs.GetNewDecimalOrZero(this.nbA2.Text);
                     this.nbProjectA2.Text = ((from x in projectDetails where x.CostType == "A2" select x.CostMoney ?? 0).Sum() + a2.CostMoney ?? 0).ToString();
                     totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA2.Text);
                     this.txtDefA2.Text    = a2.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail a3 = details.FirstOrDefault(x => x.CostType == "A3");
                 if (a3 != null)
                 {
                     this.nbA3.Text        = (a3.CostMoney ?? 0).ToString();
                     totalA               += Funs.GetNewDecimalOrZero(this.nbA3.Text);
                     this.nbProjectA3.Text = ((from x in projectDetails where x.CostType == "A3" select x.CostMoney ?? 0).Sum() + a3.CostMoney ?? 0).ToString();
                     totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA3.Text);
                     this.txtDefA3.Text    = a3.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail a4 = details.FirstOrDefault(x => x.CostType == "A4");
                 if (a4 != null)
                 {
                     this.nbA4.Text        = (a4.CostMoney ?? 0).ToString();
                     totalA               += Funs.GetNewDecimalOrZero(this.nbA4.Text);
                     this.nbProjectA4.Text = ((from x in projectDetails where x.CostType == "A4" select x.CostMoney ?? 0).Sum() + a4.CostMoney ?? 0).ToString();
                     totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA4.Text);
                     this.txtDefA4.Text    = a4.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail a5 = details.FirstOrDefault(x => x.CostType == "A5");
                 if (a5 != null)
                 {
                     this.nbA5.Text        = (a5.CostMoney ?? 0).ToString();
                     totalA               += Funs.GetNewDecimalOrZero(this.nbA5.Text);
                     this.nbProjectA5.Text = ((from x in projectDetails where x.CostType == "A5" select x.CostMoney ?? 0).Sum() + a5.CostMoney ?? 0).ToString();
                     totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA5.Text);
                     this.txtDefA5.Text    = a5.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail a6 = details.FirstOrDefault(x => x.CostType == "A6");
                 if (a6 != null)
                 {
                     this.nbA6.Text        = (a6.CostMoney ?? 0).ToString();
                     totalA               += Funs.GetNewDecimalOrZero(this.nbA6.Text);
                     this.nbProjectA6.Text = ((from x in projectDetails where x.CostType == "A6" select x.CostMoney ?? 0).Sum() + a6.CostMoney ?? 0).ToString();
                     totalProjectA        += Funs.GetNewDecimalOrZero(this.nbProjectA6.Text);
                     this.txtDefA6.Text    = a6.CostDef;
                 }
                 this.nbA.Text        = totalA.ToString();
                 this.nbProjectA.Text = totalProjectA.ToString();
                 Model.CostGoods_ExpenseDetail b1 = details.FirstOrDefault(x => x.CostType == "B1");
                 if (b1 != null)
                 {
                     this.nbB1.Text        = (b1.CostMoney ?? 0).ToString();
                     totalB               += Funs.GetNewDecimalOrZero(this.nbB1.Text);
                     this.nbProjectB1.Text = ((from x in projectDetails where x.CostType == "B1" select x.CostMoney ?? 0).Sum() + b1.CostMoney ?? 0).ToString();
                     totalProjectB        += Funs.GetNewDecimalOrZero(this.nbProjectB1.Text);
                     this.txtDefB1.Text    = b1.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail b2 = details.FirstOrDefault(x => x.CostType == "B2");
                 if (b2 != null)
                 {
                     this.nbB2.Text        = (b2.CostMoney ?? 0).ToString();
                     totalB               += Funs.GetNewDecimalOrZero(this.nbB2.Text);
                     this.nbProjectB2.Text = ((from x in projectDetails where x.CostType == "B2" select x.CostMoney ?? 0).Sum() + b2.CostMoney ?? 0).ToString();
                     totalProjectB        += Funs.GetNewDecimalOrZero(this.nbProjectB2.Text);
                     this.txtDefB2.Text    = b2.CostDef;
                 }
                 Model.CostGoods_ExpenseDetail b3 = details.FirstOrDefault(x => x.CostType == "B3");
                 if (b3 != null)
                 {
                     this.nbB3.Text        = (b3.CostMoney ?? 0).ToString();
                     totalB               += Funs.GetNewDecimalOrZero(this.nbB3.Text);
                     this.nbProjectB3.Text = ((from x in projectDetails where x.CostType == "B3" select x.CostMoney ?? 0).Sum() + b3.CostMoney ?? 0).ToString();
                     totalProjectB        += Funs.GetNewDecimalOrZero(this.nbProjectB3.Text);
                     this.txtDefB3.Text    = b3.CostDef;
                 }
                 this.nbB.Text         = totalB.ToString();
                 this.nbProjectB.Text  = totalProjectB.ToString();
                 this.nbAB.Text        = (totalA + totalB).ToString();
                 this.nbProjectAB.Text = (totalProjectA + totalProjectB).ToString();
             }
         }
         else
         {
             this.drpYear.SelectedValue   = Convert.ToString(DateTime.Now.Year);
             this.drpMonths.SelectedValue = Convert.ToString(DateTime.Now.Month);
             //this.txtMonths.Text = DateTime.Now.ToString("yyyy-MM");
             //this.txtCompileMan.Text = this.CurrUser.UserName;
             this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
             //this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
             ////自动生成编码
             this.txtExpenseCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectExpenseMenuId, this.ProjectId, this.CurrUser.UnitId);
         }
         ///初始化审核菜单
         this.ctlAuditFlow.MenuId    = BLL.Const.ProjectExpenseMenuId;
         this.ctlAuditFlow.DataId    = this.ExpenseId;
         this.ctlAuditFlow.ProjectId = this.ProjectId;
         this.ctlAuditFlow.UnitId    = this.CurrUser.UnitId;
     }
 }
        /// <summary>
        /// 绑定UI元素
        /// </summary>
        /// <param name="seatNo"></param>
        /// <param name="seatShortNo"></param>GetBespeakLogInfoBySeatNo
        void BindUIElement(string seatNo, string seatShortNo, DateTime date)
        {
            SeatManage.ClassModel.ReadingRoomInfo room           = SeatManage.Bll.T_SM_ReadingRoom.GetSingleRoomInfo(roomNo);
            SeatManage.Bll.T_SM_ReadingRoom       bllReadingRoom = new SeatManage.Bll.T_SM_ReadingRoom();
            foreach (DateTime dt in room.Setting.SeatBespeak.SpecifiedTimeList)
            {
                if (dt <= date)
                {
                    continue;
                }
                DropDownList_Time.Items.Add(new FineUI.ListItem(dt.ToShortTimeString(), dt.ToShortTimeString()));
            }
            DateTime minTime = date.AddMinutes(10 - date.Minute % 10);

            while (true)
            {
                minTime = minTime.AddMinutes(10);
                if (minTime.Date > date.Date)
                {
                    break;
                }
                if (Code.NowReadingRoomState.ReadingRoomOpenState(room.Setting.RoomOpenSet, minTime) == SeatManage.EnumType.ReadingRoomStatus.Close)
                {
                    continue;
                }
                DropDownList_FreeTime.Items.Add(new FineUI.ListItem(minTime.ToShortTimeString(), minTime.ToShortTimeString()));
            }
            if (!room.Setting.SeatBespeak.SpecifiedBespeak)
            {
                rblModel.Hidden = true;
            }
            if (rblModel.SelectedValue == "0")
            {
                DropDownList_FreeTime.Hidden = true;
                DropDownList_Time.Hidden     = true;
            }
            else
            {
                if (!room.Setting.SeatBespeak.SpecifiedTime)
                {
                    DropDownList_Time.Hidden     = true;
                    DropDownList_FreeTime.Hidden = false;
                }
                else
                {
                    DropDownList_FreeTime.Hidden = true;
                    DropDownList_Time.Hidden     = false;
                }
            }
            lblbeginDate.Text     = date.ToShortDateString();
            this.lblSeatNo.Text   = seatShortNo;
            this.lblRoomName.Text = room.Name;
            //判断自己是否已经预约座位
            List <SeatManage.EnumType.BookingStatus> bespeakStatus = new List <SeatManage.EnumType.BookingStatus>();

            bespeakStatus.Add(SeatManage.EnumType.BookingStatus.Waiting);
            List <SeatManage.ClassModel.BespeakLogInfo> readerBespeaklist = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakLogInfoByCardNo(this.LoginId, date);//.GetBespeakList(this.LoginId, null, date, 0, bespeakStatus);

            if (readerBespeaklist.Count > 0)
            {
                FineUI.Alert.ShowInTop("您今天已有预约的座位,请先取消原来的预约。");
                btnBespeak.Enabled = false;
                PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                return;
            }
            //判断可预约次数是否超过
            readerBespeaklist = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakList(this.LoginId, null, date, 0, new List <SeatManage.EnumType.BookingStatus> {
                SeatManage.EnumType.BookingStatus.Confinmed
            });                                                                                                                                                                                          //.GetBespeakList(this.LoginId, null, date, 0, bespeakStatus);
            if (readerBespeaklist.Count >= room.Setting.SeatBespeak.BespeakSeatCount)
            {
                FineUI.Alert.ShowInTop("您一天只能预约" + room.Setting.SeatBespeak.BespeakSeatCount + "次座位。");
                btnBespeak.Enabled = false;
                PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                return;
            }
            //判断读者是否有座位
            if (!room.Setting.SeatBespeak.BespeatWithOnSeat)
            {
                SeatManage.ClassModel.EnterOutLogInfo eol = SeatManage.Bll.T_SM_EnterOutLog.GetEnterOutLogInfoByCardNo(this.LoginId);
                if (eol != null && eol.EnterOutState != SeatManage.EnumType.EnterOutLogType.Leave)
                {
                    FineUI.Alert.ShowInTop("您已有座位,不能再预约座位");
                    btnBespeak.Enabled = false;
                    PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                    return;
                }
            }
            //判断操作次数
            if (SeatManage.Bll.EnterOutOperate.CheckReaderChooseSeatTimesByReadingRoom(this.LoginId, room.Setting.PosTimes, room.No))
            {
                FineUI.Alert.ShowInTop("您的选座/预约操作过于频繁,请稍后重试");
                btnBespeak.Enabled = false;
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                return;
            }
            //判断座位是否被别人使用
            SeatManage.ClassModel.Seat seat = SeatManage.Bll.T_SM_Seat.GetSeatInfoBySeatNo(seatNo);
            if (seat.SeatUsedState != SeatManage.EnumType.EnterOutLogType.Leave)
            {
                FineUI.Alert.ShowInTop("座位已经被别人选择,请预约其他座位");
                btnBespeak.Enabled = false;
                PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                return;
            }
            //判断座位是否被预约
            List <SeatManage.ClassModel.BespeakLogInfo> list = SeatManage.Bll.T_SM_SeatBespeak.GetBespeakLogInfoBySeatNo(seatNo, date);

            seatKeepTime.Value   = room.Setting.SeatBespeak.SeatKeepTime.ToString();
            this.lblEndDate.Text = string.Format("{0}至{1}", date.ToShortTimeString(), date.AddMinutes(room.Setting.SeatBespeak.SeatKeepTime).ToShortTimeString());
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].BsepeakState == SeatManage.EnumType.BookingStatus.Waiting)
                {
                    FineUI.Alert.ShowInTop("座位已经被别人预约,请预约其他座位");
                    btnBespeak.Enabled = false;
                    PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                    return;
                }
            }
            //判断是否已加入黑名单
            List <SeatManage.ClassModel.BlackListInfo> blacklistInfoByCardNo = SeatManage.Bll.T_SM_Blacklist.GetBlackListInfo(this.LoginId);

            SeatManage.ClassModel.RegulationRulesSetting rulesSet = SeatManage.Bll.T_SM_SystemSet.GetRegulationRulesSetting();
            if (room.Setting.UsedBlacklistLimit && blacklistInfoByCardNo.Count > 0)
            {
                if (room.Setting.BlackListSetting.Used)
                {
                    bool isblack = false;
                    foreach (SeatManage.ClassModel.BlackListInfo blinfo in blacklistInfoByCardNo)
                    {
                        if (blinfo.ReadingRoomID == room.No)
                        {
                            isblack = true;
                            break;
                        }
                    }
                    if (isblack)
                    {
                        FineUI.Alert.ShowInTop("你已进入黑名单,不能在该阅览室预约座位");
                        PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                        return;
                    }
                }
                else
                {
                    FineUI.Alert.ShowInTop("你已进入黑名单,不能在该阅览室预约座位");
                    PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                    return;
                }
            }
            if (room.Setting.LimitReaderEnter.Used)
            {
                SeatManage.ClassModel.ReaderInfo readerInfo = SeatManage.Bll.EnterOutOperate.GetReaderInfo(this.LoginId);
                string[] litype = room.Setting.LimitReaderEnter.ReaderTypes.Split(';');
                if (!room.Setting.LimitReaderEnter.CanEnter)
                {
                    foreach (string type in litype)
                    {
                        if (type == readerInfo.ReaderType)
                        {
                            FineUI.Alert.ShowInTop("你的读者类型不能在该阅览室预约座位");
                            PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                            return;
                        }
                    }
                }
                else
                {
                    bool isintype = false;
                    foreach (string type in litype)
                    {
                        if (type == readerInfo.ReaderType)
                        {
                            isintype = true;
                            break;
                        }
                    }
                    if (!isintype)
                    {
                        FineUI.Alert.ShowInTop("你的读者类型不能在该阅览室预约座位");
                        PageContext.RegisterStartupScript(FineUI.ActiveWindow.GetHidePostBackReference());
                        return;
                    }
                }
            }

            btnBespeak.Enabled = true;
        }
コード例 #30
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (Request.QueryString["WhichPage"].ToString() == "ExeCheck")
            {
                List <AnswerTitle> ListAnswerTitle = Session["ExeCheckTitleClassList"] as List <AnswerTitle>;
                if (ListAnswerTitle.Count > 0)
                {
                    if (Convert.ToInt32(Session["TitleIndex"]) == 0)
                    {
                        btn_LastTitle.Enabled = false;
                    }
                    if (Convert.ToInt32(Session["TitleIndex"]) < ListAnswerTitle.Count)
                    {
                        //OnQueryAnswerByTitleID(null, answerArgs);
                        txtCheckTitleName.Text     = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleName;
                        areaCheckTitleContent.Text = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleContent;
                        DataTable dtAnswer = new DataTable();
                        int       a        = Convert.ToInt32(Session["TitleIndex"]);
                        if (ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].CheckedId == 0)
                        {
                            answerArgs.CheckTitleID = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleID;
                            CJia.HealthInspection.Models.AnswerModel answerModel = new Models.AnswerModel();
                            dtAnswer = answerModel.QuyerAnswerByTitleID(answerArgs.CheckTitleID);
                            if (dtAnswer != null && dtAnswer.Rows != null && dtAnswer.Rows.Count > 0)
                            {
                                ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].dtAnswer = dtAnswer;
                                ExtAspNet.RadioButtonList radioAnswer = new ExtAspNet.RadioButtonList();
                                radioAnswer.ID                    = "radioAnswer1";
                                radioAnswer.AutoPostBack          = true;
                                radioAnswer.Required              = true;
                                radioAnswer.SelectedIndexChanged += new EventHandler(radioAnswer_SelectedIndexChanged);
                                radioAnswer.Label                 = "选择答案";
                                for (int i = 0; i < dtAnswer.Rows.Count; i++)
                                {
                                    radioAnswer.Items.Add(new RadioItem(dtAnswer.Rows[i]["ANSWER_NAME"].ToString(), dtAnswer.Rows[i]["ANSWER_ID"].ToString()));
                                }
                                //radioAnswer.DataTextField = "ANSWER_NAME";
                                //radioAnswer.DataValueField = "ANSWER_ID";
                                //radioAnswer.DataSource = dtAnswer;
                                //radioAnswer.DataBind();
                                radioRow.Items.Add(radioAnswer);
                                Session["RadioButtonList"] = radioAnswer;
                                texCheckRusult.Readonly    = true;
                                txtCheckAdvice.Readonly    = true;
                            }
                            else
                            {
                                texCheckRusult.Readonly = false;
                                txtCheckAdvice.Readonly = false;
                                //texCheckRusult.Height = 116;
                                //txtCheckAdvice.Height = 116;
                                texCheckRusult.Text = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleRusult;
                                txtCheckAdvice.Text = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleAdvice;
                                //ExtAspNet.Alert.Show("此题没有答案");
                            }
                        }
                        else
                        {
                            dtAnswer = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].dtAnswer;
                            if (dtAnswer != null && dtAnswer.Rows != null && dtAnswer.Rows.Count > 0)
                            {
                                ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].dtAnswer = dtAnswer;
                                ExtAspNet.RadioButtonList radioAnswer = new ExtAspNet.RadioButtonList();
                                radioAnswer.ID                    = "radioAnswer1";
                                radioAnswer.AutoPostBack          = true;
                                radioAnswer.Required              = true;
                                radioAnswer.SelectedIndexChanged += new EventHandler(radioAnswer_SelectedIndexChanged);
                                radioAnswer.Label                 = "选择答案";
                                for (int i = 0; i < dtAnswer.Rows.Count; i++)
                                {
                                    radioAnswer.Items.Add(new RadioItem(dtAnswer.Rows[i]["ANSWER_NAME"].ToString(), dtAnswer.Rows[i]["ANSWER_ID"].ToString()));
                                }
                                radioAnswer.Items[ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].CheckedIndex].Selected = true;
                                texCheckRusult.Text = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleRusult;
                                txtCheckAdvice.Text = ListAnswerTitle[Convert.ToInt32(Session["TitleIndex"])].TitleAdvice;
                                radioRow.Items.Add(radioAnswer);
                                Session["RadioButtonList"] = radioAnswer;
                                texCheckRusult.Readonly    = true;
                                txtCheckAdvice.Readonly    = true;
                            }
                            //else
                            //{
                            //    ExtAspNet.Alert.Show("此题没有答案");
                            //}
                        }
                        Session["IsAnswer"] = "1";
                    }
                    else
                    {
                        //Session["ExeCheckTitleClassList"] = ListAnswerTitle;
                        //if (Session["ExeCheckTitleClassList"] != null)
                        //{
                        //    string CheckResult = "XX市XX区卫生监督所卫生监督员【{0},{1}】,对【{2}】进行现场检查。检查人员向【{3}】负责人出示执法证并了解相关情况,经检查发现:" + Environment.NewLine; ;
                        //    string CheckAdvice = "";
                        //    int a = 1;
                        //    int b = 1;
                        //    //List<AnswerTitle> ListAnswerTitle1 = Session["ExeCheckTitleClassList"] as List<AnswerTitle>;
                        //    for (int i = 0; i < ListAnswerTitle.Count; i++)
                        //    {
                        //        if (ListAnswerTitle[i].TitleRusult != "")
                        //        {
                        //            CheckResult = CheckResult + a.ToString() + "、 " + ListAnswerTitle[i].TitleRusult + "。" + Environment.NewLine;
                        //            a++;
                        //        }
                        //        if (ListAnswerTitle[i].TitleAdvice != "")
                        //        {
                        //            CheckAdvice = CheckAdvice + b.ToString() + "、 " + ListAnswerTitle[i].TitleAdvice + "。" + Environment.NewLine;
                        //            b++;
                        //        }
                        //    }
                        //    Session["CheckResult"] = CheckResult;
                        //    Session["CheckAdvice"] = CheckAdvice;
                        //}

                        Alert.ShowInTop("题目已答完", MessageBoxIcon.Information);
                        Session["IsAnswer"] = "0";
                        PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                    }
                }
            }
            if (Request.QueryString["WhichPage"].ToString() == "ExeTask")
            {
                List <AnswerTitle> ListAnswerTaskTitle = Session["ExeTaskTitleClassList"] as List <AnswerTitle>;
                if (ListAnswerTaskTitle.Count > 0)
                {
                    if (Convert.ToInt32(Session["TitleIndexTask"]) == 0)
                    {
                        btn_LastTitle.Enabled = false;
                    }
                    if (Convert.ToInt32(Session["TitleIndexTask"]) < ListAnswerTaskTitle.Count)
                    {
                        //OnQueryAnswerByTitleID(null, answerArgs);
                        txtCheckTitleName.Text     = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleName;
                        areaCheckTitleContent.Text = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleContent;
                        DataTable dtAnswer = new DataTable();
                        int       a        = Convert.ToInt32(Session["TitleIndexTask"]);
                        if (ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].CheckedId == 0)
                        {
                            answerArgs.CheckTitleID = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleID;
                            CJia.HealthInspection.Models.AnswerModel answerModel = new Models.AnswerModel();
                            dtAnswer = answerModel.QuyerAnswerByTitleID(answerArgs.CheckTitleID);
                            if (dtAnswer != null && dtAnswer.Rows != null && dtAnswer.Rows.Count > 0)
                            {
                                ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].dtAnswer = dtAnswer;
                                ExtAspNet.RadioButtonList radioAnswer = new ExtAspNet.RadioButtonList();
                                radioAnswer.ID                    = "radioAnswer1";
                                radioAnswer.AutoPostBack          = true;
                                radioAnswer.Required              = true;
                                radioAnswer.SelectedIndexChanged += new EventHandler(radioAnswer_SelectedIndexChanged);
                                radioAnswer.Label                 = "选择答案";
                                for (int i = 0; i < dtAnswer.Rows.Count; i++)
                                {
                                    radioAnswer.Items.Add(new RadioItem(dtAnswer.Rows[i]["ANSWER_NAME"].ToString(), dtAnswer.Rows[i]["ANSWER_ID"].ToString()));
                                }
                                //radioAnswer.DataTextField = "ANSWER_NAME";
                                //radioAnswer.DataValueField = "ANSWER_ID";
                                //radioAnswer.DataSource = dtAnswer;
                                //radioAnswer.DataBind();
                                radioRow.Items.Add(radioAnswer);
                                Session["RadioButtonList"] = radioAnswer;
                                texCheckRusult.Readonly    = true;
                                txtCheckAdvice.Readonly    = true;
                            }
                            else
                            {
                                texCheckRusult.Readonly = false;
                                txtCheckAdvice.Readonly = false;
                                texCheckRusult.Text     = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleRusult;
                                txtCheckAdvice.Text     = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleAdvice;
                                //ExtAspNet.Alert.Show("此题没有答案");
                            }
                        }
                        else
                        {
                            dtAnswer = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].dtAnswer;
                            if (dtAnswer != null && dtAnswer.Rows != null && dtAnswer.Rows.Count > 0)
                            {
                                ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].dtAnswer = dtAnswer;
                                ExtAspNet.RadioButtonList radioAnswer = new ExtAspNet.RadioButtonList();
                                radioAnswer.ID                    = "radioAnswer1";
                                radioAnswer.AutoPostBack          = true;
                                radioAnswer.Required              = true;
                                radioAnswer.SelectedIndexChanged += new EventHandler(radioAnswer_SelectedIndexChanged);
                                radioAnswer.Label                 = "选择答案";
                                for (int i = 0; i < dtAnswer.Rows.Count; i++)
                                {
                                    radioAnswer.Items.Add(new RadioItem(dtAnswer.Rows[i]["ANSWER_NAME"].ToString(), dtAnswer.Rows[i]["ANSWER_ID"].ToString()));
                                }
                                radioAnswer.Items[ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].CheckedIndex].Selected = true;
                                texCheckRusult.Text = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleRusult;
                                txtCheckAdvice.Text = ListAnswerTaskTitle[Convert.ToInt32(Session["TitleIndexTask"])].TitleAdvice;
                                radioRow.Items.Add(radioAnswer);
                                Session["RadioButtonList"] = radioAnswer;
                                texCheckRusult.Readonly    = true;
                                txtCheckAdvice.Readonly    = true;
                            }
                            //else
                            //{
                            //    ExtAspNet.Alert.Show("此题没有答案");
                            //}
                        }
                        Session["IsAnswer"] = "1";
                    }
                    else
                    {
                        //Session["ExeTaskTitleClassList"] = ListAnswerTaskTitle;
                        //if (Session["ExeTaskTitleClassList"] != null)
                        //{
                        //    string CheckResult = "XX市XX区卫生监督所卫生监督员【{0},{1}】,对【{2}】进行现场检查。检查人员向【{3}】负责人出示执法证并了解相关情况,经检查发现:" + Environment.NewLine; ;
                        //    string CheckAdvice = "";
                        //    int a = 1;
                        //    int b = 1;
                        //    //List<AnswerTitle> ListAnswerTitle1 = Session["ExeCheckTitleClassList"] as List<AnswerTitle>;
                        //    for (int i = 0; i < ListAnswerTaskTitle.Count; i++)
                        //    {
                        //        if (ListAnswerTaskTitle[i].TitleRusult != "")
                        //        {
                        //            CheckResult = CheckResult + a.ToString() + "、 " + ListAnswerTaskTitle[i].TitleRusult + "。" + Environment.NewLine;
                        //            a++;
                        //        }
                        //        if (ListAnswerTaskTitle[i].TitleAdvice != "")
                        //        {
                        //            CheckAdvice = CheckAdvice + b.ToString() + "、 " + ListAnswerTaskTitle[i].TitleAdvice + "。" + Environment.NewLine;
                        //            b++;
                        //        }
                        //    }
                        //    Session["CheckResultTask"] = CheckResult;
                        //    Session["CheckAdviceTask"] = CheckAdvice;
                        //}

                        Alert.ShowInTop("题目已答完", MessageBoxIcon.Information);
                        Session["IsAnswer"] = "0";
                        PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
                    }
                }
            }
        }
コード例 #31
0
ファイル: Employee.aspx.cs プロジェクト: Marveliu/erp
 //关闭页面
 protected void btnClose_Click(object sender, EventArgs e)
 {
     if (gridEmployee.SelectedRowIndexArray.Length == 0)
     {
         Alert.ShowInTop("未选择数据", "信息", MessageBoxIcon.Information, ActiveWindow.GetHideReference());
     }
     else
     {
         Alert.ShowInTop("您已选择了一条数据,是否确认关闭本窗口?", "询问", MessageBoxIcon.Question, ActiveWindow.GetHideReference());
     }
 }
コード例 #32
0
ファイル: Add_Patent.aspx.cs プロジェクト: 15831944/C-12-
        //保存
        protected void Save_Click(object sender, EventArgs e)
        {
            try
            {
                if (tPatentName.Text.Trim() == "")
                {
                    Alert.Show("专利名称不能为空!");
                    return;
                }
                if (tPatentNumber.Text.Trim() == "")
                {
                    Alert.Show("专利号不能为空!");
                    return;
                }
                if (tGivenUnit.Text.Trim() == "")
                {
                    Alert.Show("授予机构不能为空!");
                    return;
                }
                if (tState.Text.Trim() == "")
                {
                    Alert.Show("状态不能为空!");
                    return;
                }
                if (PatentPeople.Text.Trim() == "")
                {
                    Alert.Show("全部发明人不能为空!");
                    return;
                }
                if (FirstPeople.Text.Trim() == "")
                {
                    Alert.Show("第一发明人不能为空!");
                    return;
                }
                if (tAccreditTime.SelectedDate < tApplicationTime.SelectedDate)
                {
                    Alert.ShowInTop("授权时间不能小于申请时间!");
                    return;
                }
                string username = user.FindByLoginName(Session["LoginName"].ToString()).UserName;
                pa.EntryPerson = username;
                //pa.Member = PatentMember.Text.Trim();
                List <string> list = new List <string>();
                string        unit = "";
                list.Add(tPatentDepartment1.Text.ToString());
                list.Add(tPatentDepartment2.Text.ToString());
                list.Add(tPatentDepartment3.Text.ToString());
                List <string> newlist = new List <string>();
                for (int i = 0; i < 3; i++)
                {
                    if (!string.IsNullOrEmpty(list[i].ToString()))
                    {
                        newlist.Add(list[i].ToString());
                    }
                }

                if (newlist.Count != 0)
                {
                    for (int j = 0; j < newlist.Count; j++)
                    {
                        unit += newlist[j].ToString();
                        if (j == newlist.Count() - 1)
                        {
                            break;
                        }
                        unit += ",";
                    }
                    pa.PatentDepartment = unit;
                }
                else
                {
                    pa.PatentDepartment = null;
                }
                if (Convert.ToInt32(Session["SecrecyLevel"]) == 5)
                {
                    InsertValue();
                    pa.IsPass = true;
                    //lby ↓
                    int attachid = pm.UpLoadFile(PatentFile).Attachid;
                    switch (attachid)
                    {
                    case -1:
                        Alert.ShowInTop("专利证书文件类型不符,请重新选择!");
                        return;

                    case 0:
                        Alert.ShowInTop("专利证书文件名已经存在!");
                        return;

                    case -2:
                        Alert.ShowInTop("专利证书文件不能大于150M");
                        return;
                    }
                    if (attachid != -3)
                    {
                        pa.Attachment_Patent = attachid;
                    }
                    else
                    {
                        pa.Attachment_Patent = null;
                    }

                    attachid = pm.UpLoadFile(ApplicationFile).Attachid;
                    switch (attachid)
                    {
                    case -1:
                        Alert.ShowInTop("申请书文件类型不符,请重新选择!");
                        return;

                    case 0:
                        Alert.ShowInTop("申请书文件名已经存在!");
                        return;

                    case -2:
                        Alert.ShowInTop("申请书文件不能大于150M");
                        return;
                    }
                    if (attachid != -3)
                    {
                        pa.Attachment_Application = attachid;
                    }
                    else
                    {
                        pa.Attachment_Application = null;
                    }
                    if (tAchievement.SelectedItem != null)
                    {
                        pa.AchievementID = tAchievement.SelectedItem.Text;
                    }
                    else
                    {
                        pa.AchievementID = tAchievement.Text;
                    }
                    patent.Insert(pa);
                    PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("保存成功!"));
                }
                else
                {
                    InsertValue();
                    pa.IsPass = false;
                    //lby ↓
                    int attachid = pm.UpLoadFile(PatentFile).Attachid;
                    switch (attachid)
                    {
                    case -1:
                        Alert.ShowInTop("专利证书文件类型不符,请重新选择!");
                        return;

                    case 0:
                        Alert.ShowInTop("专利证书文件名已经存在!");
                        return;

                    case -2:
                        Alert.ShowInTop("专利证书文件不能大于150M");
                        return;
                    }
                    if (attachid != -3)
                    {
                        pa.Attachment_Patent = attachid;
                    }
                    else
                    {
                        pa.Attachment_Patent = null;
                    }

                    attachid = pm.UpLoadFile(ApplicationFile).Attachid;
                    switch (attachid)
                    {
                    case -1:
                        Alert.ShowInTop("申请书文件类型不符,请重新选择!");
                        return;

                    case 0:
                        Alert.ShowInTop("申请书文件名已经存在!");
                        return;

                    case -2:
                        Alert.ShowInTop("申请书文件不能大于150M");
                        return;
                    }
                    if (attachid != -3)
                    {
                        pa.Attachment_Application = attachid;
                    }
                    else
                    {
                        pa.Attachment_Application = null;
                    }

                    patent.Insert(pa);
                    operate.LoginName        = username;
                    operate.OperationTime    = DateTime.Now;
                    operate.LoginIP          = " ";
                    operate.OperationContent = "Patent";
                    operate.OperationType    = "添加";
                    operate.OperationDataID  = pa.PatentID;
                    op.Insert(operate);
                    PageContext.RegisterStartupScript(ActiveWindow.GetConfirmHideRefreshReference() + Alert.GetShowInTopReference("您的数据已提交,请等待确认!"));
                }
            }
            catch (Exception ex)
            {
                //lby ↓
                if (pa.Attachment_Patent != null && pa.Attachment_Application != null)
                {
                    int[]  attachid         = { pa.Attachment_Patent.Value, pa.Attachment_Application.Value };
                    string path_Patent      = at.FindPath(attachid[0]);
                    string path_Application = at.FindPath(attachid[1]);
                    pm.DeleteFile(attachid[0], path_Patent);
                    pm.DeleteFile(attachid[1], path_Application);
                }
                pm.SaveError(ex, this.Request);
            }
        }
コード例 #33
0
 /// <summary>
 /// 保存按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     this.SaveData(BLL.Const.BtnSave);
     PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
 }
コード例 #34
0
ファイル: JupiterForm.cs プロジェクト: AlexSneg/VIRD-1.0
 private void SetCropping(ActiveWindow wnd)
 {
     if ((wnd.CroppingLeft | wnd.CroppingRight | wnd.CroppingTop | wnd.CroppingBottom) == 0) return;
     axGalileoCtrl.Crop(wnd.CroppingLeft, wnd.CroppingTop,
                        wnd.Width - wnd.CroppingRight,
                        wnd.Height - wnd.CroppingBottom);
 }