Ejemplo n.º 1
0
        /// <summary>
        /// 检查会议编号是否重复
        /// </summary>
        protected void CheckNum()
        {
            String str = String.Empty;
            String id  = Request.QueryString["id"].Trim();
            String num = Request.QueryString["num"].Trim();

            if (!String.IsNullOrEmpty(num))
            {
                BContract BLL = new BContract();
                if (String.IsNullOrEmpty(id))
                {//新增
                    if (BLL.ExistsNumber(num, "", this.SiteUserInfo.CompanyId))
                    {
                        str = "1";
                    }
                }
                else
                { //编辑
                    MGovContract Model = BLL.GetGovContractModel(id);
                    if (null != Model && !String.Equals(num, Model.Number))
                    {
                        if (BLL.ExistsNumber(num, "", this.SiteUserInfo.CompanyId))
                        {
                            str = "1";
                        }
                    }
                }
            }
            Response.Clear();
            Response.Write(str);
            Response.End();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 页面初始化
 /// </summary>
 /// <param name="id">操作ID</param>
 protected void PageInit(string id)
 {
     #region 初始化用户控件
     this.SingleFileUpload1.CompanyID = this.SiteUserInfo.CompanyId;
     #endregion
     //编辑初始化
     if (!string.IsNullOrEmpty(id))
     {
         BContract    BLL   = new BContract();
         MGovContract Model = BLL.GetGovContractModel(id);
         if (null != Model)
         {
             this.hidKeyId.Value             = Model.ID;
             this.txtNumber.Text             = Model.Number;
             this.txtType.Text               = Model.Type;
             this.txtCompany.Text            = Model.Company;
             this.txtStartTime.Text          = UtilsCommons.GetDateString(Model.SignedTime, this.ProviderToDate);
             this.txtEndTime.Text            = UtilsCommons.GetDateString(Model.MaturityTime, this.ProviderToDate);
             this.txtContent.Text            = Model.Description;
             this.HrSelect1.HrSelectID       = Model.signierId;
             this.HrSelect1.HrSelectName     = Model.signier;
             this.SelectSection1.SectionID   = Model.SignedDepId.ToString();
             this.SelectSection1.SectionName = Model.SignedDep;
             if (Model.IsRemind)
             {
                 warn.Checked = true;
             }
             else
             {
                 nowarn.Checked = true;
             }
             StringBuilder strFile = new StringBuilder();
             IList <EyouSoft.Model.ComStructure.MComAttach> lstFile = Model.ComAttachList;
             if (Model.ComAttachList != null && Model.ComAttachList.Count > 0)
             {
                 for (int i = 0; i < lstFile.Count; i++)
                 {
                     strFile.AppendFormat("<span class='upload_filename'><a href='/CommonPage/FileDownLoad.aspx?doType=downLoad&filePath={0}&name={1}' target='_blank'>{1}</a><a href=\"javascript:void(0)\" onclick=\"PageJsData.DelFile(this)\" style='color:#f00;font-weight:bolder;' title='删除附件'><img style='vertical-align:middle' src='/images/cha.gif'></a><input type=\"hidden\" name=\"hideFileInfo\" value='{1}|{0}'/></span>", lstFile[i].FilePath, lstFile[i].Name);
                 }
             }
             this.lbFiles.Text = strFile.ToString();
             if (!this.SiteUserInfo.IsHandleElse && this.SiteUserInfo.UserId != Model.OperatorId)
             {
                 this.ph_Save.Visible = false;
             }
         }
     }
 }