Esempio n. 1
0
        protected void BindOUInfo()
        {
            Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
            Epoint.MisBizLogic2.Data.MisGuidRow  oRow     = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
            Epoint.MisBizLogic2.Data.MisGuidRow  arow     = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_OUInfo", oRow["DanWeiGuid"].ToString());
            EnterpriseName.Text    = arow["EnterpriseName"].ToString();
            CodeCertificate.Text   = arow["CodeCertificate"].ToString();
            EnterpriseType.Text    = arow["EnterpriseType"].ToString();
            LegalPerson.Text       = arow["LegalPerson"].ToString();
            RegionCharacter.Text   = arow["RegionCharacter"].ToString();
            BusinessLicenseNO.Text = arow["BusinessLicenseNO"].ToString();
            Contacter.Text         = arow["Contacter"].ToString();
            Tel.Text           = arow["Tel"].ToString();
            ContacterID.Text   = arow["ContacterID"].ToString();
            Email.Text         = arow["Email"].ToString();
            Address.Text       = arow["Address"].ToString();
            RegistAddress.Text = arow["RegistAddress"].ToString();
            BeiZhu.Text        = arow["BeiZhu"].ToString();
            DataView dv   = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + oRow["DanWeiGuid"].ToString() + "'and RelatedType='OU'");
            string   Type = "";

            foreach (DataRowView row in dv)
            {
                Type += codemain.GetCodeText_FromHash("RG_会员单位", row["OuType"].ToString()) + ';';
            }
            EnterpriseType.Text = Type;
        }
Esempio n. 2
0
        /// <summary>
        /// 绑定单位类别
        /// </summary>
        private void BindOuType()
        {
            string rguserguid = Epoint.Frame.Bizlogic.common.strReplaceSql(Request["RowGuid"]);
            string danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(dpDanWeiGuid.SelectedValue);

            if (string.IsNullOrEmpty(danweiguid))
            {
                danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(DanWeiGuid_2010.Text);
            }
            // 获得所属单位的单位类别
            DataView dvOuType  = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");
            DataView dvOuType1 = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='User' AND RelatedGuid='" + rguserguid + "'");

            List <string> lstOuType = new List <string>();

            foreach (DataRowView item in dvOuType1)
            {
                lstOuType.Add(item[0].ToString());
            }
            if (dvOuType.Count > 0)
            {
                Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
                foreach (DataRowView item in dvOuType)
                {
                    ListItem li = new ListItem(oCodeMain.GetCodeText_FromHash("RG_会员单位", item[0].ToString()), item[0].ToString());
                    li.Selected = lstOuType.IndexOf(item[0].ToString()) >= 0;
                    cblOUType.Items.Add(li);
                }
            }
            else
            {
                //trOuType.Visible = false;
            }
        }
Esempio n. 3
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
     if (!Page.IsPostBack)
     {
         ViewState["TableName"] = oDetailPage.TableDetail.TableName;
         Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(oDetailPage.TableDetail.SQL_TableName, Request["RowGuid"]);
         if (!oRow.R_HasFilled)
         {
             this.AlertAjaxMessage("没有对应的数据记录!");
             this.WriteAjaxMessage("window.close();");
             return;
         }
         if (Convert.ToString(oRow["UserType"]) == "001")
         {
             trperson.Style["display"] = "";
             tabou.Style["display"]    = "none";
             trDanwei.Style["display"] = "none";
             trOuType.Style["display"] = "none";
         }
         else
         if (Convert.ToString(oRow["UserType"]) == "003")
         {
             trperson.Style["display"] = "";
             tabou.Style["display"]    = "none";
             trDanwei.Style["display"] = "";
             trOuType.Style["display"] = "";
             Epoint.MisBizLogic2.Data.MisGuidRow userrow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
             OUBelong.Text = Epoint.MisBizLogic2.DB.ExecuteToString("select EnterpriseName from RG_OUInfo where RowGuid='" + userrow["DanWeiGuid"].ToString() + "'");
             DataView dv   = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + Request["RowGuid"] + "'and RelatedType='User'");
             string   Type = "";
             foreach (DataRowView row in dv)
             {
                 Type += codemain.GetCodeText_FromHash("RG_会员单位", row["OuType"].ToString()) + ';';
             }
             OUType.Text = Type;
         }
         else
         {
             trperson.Style["display"] = "none";
             tabou.Style["display"]    = "";
             trDanwei.Style["display"] = "none";
             trOuType.Style["display"] = "none";
             BindOUInfo();
         }
         Epoint.MisBizLogic2.Web.CodeGenerator.InitiateControl_DetailPage(oDetailPage, tdContainer, oRow);
         isEnableSMS.Text      = showisEnableSMS(Convert.ToString(oRow["EnableSMS"]));
         EnableOnlineChat.Text = showEnableOnlineChat(Convert.ToString(oRow["EnableOnlineChat"]));
         BindRoleName();
     }
 }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //获取当前企业的guid
            string strSql = "select DanWeiGuid from RG_USER where ROWGUID='" + Session["UserGuid"] + "'";

            ViewState["DWGuid"] = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);
            string QYStatus = Epoint.MisBizLogic2.DB.ExecuteToString("SELECT STATUS FROM RG_OUInfo WHERE ROWGUID='" + ViewState["DWGuid"] + "'");

            //获取状态,编辑中、审核退回的,到edit2
            //if(QYStatus == "60" || QYStatus == "80")
            //{
            //    lblQYEditMessage.Text = "企业信息修改";
            //    OE.Attributes.Add("onclick", "OpenWindow('Pages/RG_OU/RG_OU_Edit2.aspx?RowGuid=" + ViewState["DWGuid"].ToString() + "',800,700);");
            //}
            //通过的、变更中的,到edit
            if (QYStatus == "60" || QYStatus == "85" || QYStatus == "80" || QYStatus == "90")//if (QYStatus == "85" || QYStatus == "90")
            {
                lblQYEditMessage.Text = "企业信息 - " + DB_CM.GetCodeText_FromHash("审核状态", QYStatus);
                OE.Attributes.Add("onclick", "OpenWindow('Pages/RG_OU/RG_OU_Edit.aspx?RowGuid=" + ViewState["DWGuid"].ToString() + "',800,700);");
            }
            else//查看
            {
                lblQYEditMessage.Text = "企业信息 - " + DB_CM.GetCodeText_FromHash("审核状态", QYStatus);
                OE.Attributes.Add("onclick", "OpenWindow('Pages/RG_OU/RG_OU_All_Detail.aspx?stype=view&RowGuid=" + ViewState["DWGuid"].ToString() + "',800,700);");
            }

            //获取未审核通过的企业职业人员数
            strSql = "select Count(*) from RG_QYUser where DWGuid='" + ViewState["DWGuid"] + "' and DelStatus='1' and Status in('60','80')";
            lblNoPassRYCount.Text = "(" + Epoint.MisBizLogic2.DB.ExecuteToString(strSql) + ")";

            //获取未审核通过的企业资质数
            strSql            = "select Count(*) from RG_QiYeZiZhi where DWGuid='" + ViewState["DWGuid"] + "' and DelStatus='1' and Status in('60','80')";
            lblQYZZCount.Text = "(" + Epoint.MisBizLogic2.DB.ExecuteToString(strSql) + ")";

            //获取未审核通过的企业资质数
            strSql          = "select Count(*) from RG_XMBeiAn where DWGuid='" + ViewState["DWGuid"] + "' and DelStatus='1' and Status in('60','80')";
            lblBACount.Text = "(" + Epoint.MisBizLogic2.DB.ExecuteToString(strSql) + ")";
        }
Esempio n. 5
0
        /// <summary>
        /// 绑定会员的单位类别
        /// </summary>
        private void BindOuType(string danweiguid)
        {
            // 获得所属单位的单位类别
            DataView dvOuType = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");

            if (dvOuType.Count > 0)
            {
                Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
                foreach (DataRowView item in dvOuType)
                {
                    cblOUType.Items.Add(new ListItem(oCodeMain.GetCodeText_FromHash("RG_会员单位", item[0].ToString()), item[0].ToString()));
                }
            }
        }
Esempio n. 6
0
        /// <summary>
        /// �󶨵�λ���
        /// </summary>
        private void BindOuType()
        {
            string rguserguid = Epoint.Frame.Bizlogic.common.strReplaceSql(Request["RowGuid"]);
            string danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(dpDanWeiGuid.SelectedValue);
            if (string.IsNullOrEmpty(danweiguid))
                danweiguid = Epoint.Frame.Bizlogic.common.strReplaceSql(DanWeiGuid_2010.Text);
            // ��������λ�ĵ�λ���
            DataView dvOuType = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");
            DataView dvOuType1 = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='User' AND RelatedGuid='" + rguserguid + "'");

            List<string> lstOuType = new List<string>();
            foreach (DataRowView item in dvOuType1)
            {
                lstOuType.Add(item[0].ToString());
            }
            if (dvOuType.Count > 0)
            {
                Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
                foreach (DataRowView item in dvOuType)
                {
                    ListItem li = new ListItem(oCodeMain.GetCodeText_FromHash("RG_��Ա��λ", item[0].ToString()), item[0].ToString());
                    li.Selected = lstOuType.IndexOf(item[0].ToString()) >= 0;
                    cblOUType.Items.Add(li);
                }
            }
            else
            {
                //trOuType.Visible = false;
            }
        }
Esempio n. 7
0
 protected void BindOUInfo()
 {
     Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
     Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
     Epoint.MisBizLogic2.Data.MisGuidRow arow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_OUInfo", oRow["DanWeiGuid"].ToString());
     EnterpriseName.Text = arow["EnterpriseName"].ToString();
     CodeCertificate.Text = arow["CodeCertificate"].ToString();
     EnterpriseType.Text = arow["EnterpriseType"].ToString();
     LegalPerson.Text = arow["LegalPerson"].ToString();
     RegionCharacter.Text = arow["RegionCharacter"].ToString();
     BusinessLicenseNO.Text = arow["BusinessLicenseNO"].ToString();
     Contacter.Text = arow["Contacter"].ToString();
     Tel.Text = arow["Tel"].ToString();
     ContacterID.Text = arow["ContacterID"].ToString();
     Email.Text = arow["Email"].ToString();
     Address.Text = arow["Address"].ToString();
     RegistAddress.Text = arow["RegistAddress"].ToString();
     BeiZhu.Text = arow["BeiZhu"].ToString();
     DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + oRow["DanWeiGuid"].ToString() + "'and RelatedType='OU'");
     string Type = "";
     foreach (DataRowView row in dv)
     {
         Type += codemain.GetCodeText_FromHash("RG_��Ա��λ", row["OuType"].ToString()) + ';';
     }
     EnterpriseType.Text = Type;
 }
Esempio n. 8
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     Epoint.MisBizLogic2.Code.DB_CodeMain codemain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
     if (!Page.IsPostBack)
     {
         ViewState["TableName"] = oDetailPage.TableDetail.TableName;
         Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(oDetailPage.TableDetail.SQL_TableName, Request["RowGuid"]);
         if (!oRow.R_HasFilled)
         {
             this.AlertAjaxMessage("û�ж�Ӧ�����ݼ�¼��");
             this.WriteAjaxMessage("window.close();");
             return;
         }
         if (Convert.ToString(oRow["UserType"]) == "001")
         {
             trperson.Style["display"] = "";
             tabou.Style["display"] = "none";
             trDanwei.Style["display"] = "none";
             trOuType.Style["display"] = "none";
         }
         else
             if (Convert.ToString(oRow["UserType"]) == "003")
             {
                 trperson.Style["display"] = "";
                 tabou.Style["display"] = "none";
                 trDanwei.Style["display"] = "";
                 trOuType.Style["display"] = "";
                 Epoint.MisBizLogic2.Data.MisGuidRow userrow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User", Request["RowGuid"]);
                 OUBelong.Text = Epoint.MisBizLogic2.DB.ExecuteToString("select EnterpriseName from RG_OUInfo where RowGuid='" + userrow["DanWeiGuid"].ToString() + "'");
                 DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select * FROM RG_OuType_Relate WHERE RelatedGuid='" + Request["RowGuid"] + "'and RelatedType='User'");
                 string Type = "";
                 foreach (DataRowView row in dv)
                 {
                     Type += codemain.GetCodeText_FromHash("RG_��Ա��λ", row["OuType"].ToString()) + ';';
                 }
                 OUType.Text = Type;
             }
             else
             {
                 trperson.Style["display"] = "none";
                 tabou.Style["display"] = "";
                 trDanwei.Style["display"] = "none";
                 trOuType.Style["display"] = "none";
                 BindOUInfo();
             }
         Epoint.MisBizLogic2.Web.CodeGenerator.InitiateControl_DetailPage(oDetailPage, tdContainer, oRow);
         isEnableSMS.Text = showisEnableSMS(Convert.ToString(oRow["EnableSMS"]));
         EnableOnlineChat.Text = showEnableOnlineChat(Convert.ToString(oRow["EnableOnlineChat"]));
         BindRoleName();
     }
 }
Esempio n. 9
0
 /// <summary>
 /// �󶨻�Ա�ĵ�λ���
 /// </summary>
 private void BindOuType(string danweiguid)
 {
     // ��������λ�ĵ�λ���
     DataView dvOuType = Epoint.MisBizLogic2.DB.ExecuteDataView("select OuType from RG_OuType_Relate where RelatedType='Ou' AND RelatedGuid='" + danweiguid + "'");
     if (dvOuType.Count > 0)
     {
         Epoint.MisBizLogic2.Code.DB_CodeMain oCodeMain = new Epoint.MisBizLogic2.Code.DB_CodeMain();
         foreach (DataRowView item in dvOuType)
         {
             cblOUType.Items.Add(new ListItem(oCodeMain.GetCodeText_FromHash("RG_��Ա��λ", item[0].ToString()), item[0].ToString()));
         }
     }
 }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //先处理下附件文件夹中的备案表,防止过大
                DeleteSignedFile(Server.MapPath(Request.ApplicationPath + "/AttachStorage/"));
                HeTongBeiAn_ND myReport          = new HeTongBeiAn_ND();
                string         strSql            = "";
                string         WatermarkImageUrl = Server.MapPath(Request.ApplicationPath + "/HTProject/Pages/Images/合同备案公章.gif");

                //先初始化项目信息

                //看看该公司所在的地区

                CRS_BeiAn.Report.FileName = System.Configuration.ConfigurationManager.AppSettings["BeiAnPrint_ND"];

                #region 人员
                HeTongInfo ds = new HeTongInfo();
                strSql = "select * from RG_XMAndRY RY where XMGuid='" + Request["RowGuid"] + "' order by substring(RY.ZhuanYeCode,1,4) asc,ddrole desc";
                DataView dvRY = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);

                for (int i = 0; i < dvRY.Count; i++)
                {
                    DataRow dr4;
                    dr4 = ds.Tables["RYOfXM"].NewRow();
                    dr4["ZiZhiText"]   = dvRY[i]["ZiZhiText"].ToString();
                    dr4["ZhuanYeText"] = dvRY[i]["ZhuanYeText"].ToString();
                    dr4["RYName"]      = dvRY[i]["RYName"].ToString();
                    dr4["IDNum"]       = dvRY[i]["IDNum"];//Convert.ToDecimal(
                    dr4["ZhiCheng"]    = DB_CM.GetCodeText_FromHash("职称", Convert.ToString(dvRY[i]["ZhiCheng"]));;
                    dr4["YinZhangNo"]  = dvRY[i]["YinZhangNo"].ToString();
                    dr4["ZhuanYeSX"]   = dvRY[i]["ZhuanYeSX"].ToString();

                    //处理下从事的专业,尽量缩小
                    string ZhuanYeCS = dvRY[i]["ZhuanYeCS"].ToString();

                    dr4["ZhuanYeCS"] = ZhuanYeCS;
                    dr4["GongLing"]  = dvRY[i]["GongLing"];
                    dr4["DDRole"]    = DB_CM.GetCodeText_FromHash("项目角色", Convert.ToString(dvRY[i]["DDRole"]));
                    dr4["OrNo"]      = i + 1;
                    ds.Tables["RYOfXM"].Rows.Add(dr4);
                }

                myReport.SetDataSource(ds.Tables["RYOfXM"]);
                #endregion

                #region 参数
                strSql = "select * from RG_XMBeiAn where RowGuid='" + Request["RowGuid"] + "'";
                DataView dv          = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
                string   DWName      = "";
                string   TJDate      = "";
                string   XMName      = "";
                string   XMAdd       = "";
                string   ToTalMoney  = "";
                string   GuiMoDJ     = "";
                string   JSDWName    = "";
                string   XMLXR_JS    = "";
                string   LXDH_JS     = "";
                string   XMLXR_KS    = "";
                string   LXDH_KS     = "";
                string   XMFZR       = "";
                string   ZiZhiDJ     = "";
                string   ZiZhiDJ_ZH  = "";
                string   HeTongMoney = "";
                string   XMBH        = "";
                string   STATUS      = "";
                //有效期
                string YXQ = "";
                if (dv.Count > 0)
                {
                    STATUS = dv[0]["STATUS"].ToString();
                    strSql = "select EnterpriseName from RG_OUInfo where RowGuid='" + dv[0]["DWGuid"] + "'";
                    DWName = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);

                    myReport.SetParameterValue("DWName", DWName);
                    if (dv[0]["TJDate"].ToString() != "")
                    {
                        TJDate = DateTime.Parse(dv[0]["TJDate"].ToString()).ToString("yyyy-MM-dd");
                    }
                    else
                    {
                        TJDate = "";
                    }
                    myReport.SetParameterValue("TJDate", TJDate);
                    XMName = dv[0]["XMName"].ToString();
                    myReport.SetParameterValue("XMName", XMName);
                    XMAdd = DB_CM.GetCodeText_FromHash("项目地点", Convert.ToString(dv[0]["XMAddress"]));
                    myReport.SetParameterValue("XMAddress", XMAdd);
                    ToTalMoney = dv[0]["ToTalMoney"] + "万元";
                    myReport.SetParameterValue("ToTalMoney", ToTalMoney);
                    ZiZhiDJ    = dv[0]["ZiZhiDJ"].ToString();
                    ZiZhiDJ_ZH = dv[0]["ZiZhiBH"].ToString();
                    myReport.SetParameterValue("ZiZhiDJ", ZiZhiDJ);
                    //myReport.SetParameterValue("ZiZhiDJ_ZH", ZiZhiDJ_ZH);
                    HeTongMoney = dv[0]["HeTongMoney"] + "万元";
                    myReport.SetParameterValue("HeTongMoney", HeTongMoney);
                    GuiMoDJ = DB_CM.GetCodeText_FromHash("项目规模等级", Convert.ToString(dv[0]["GuiMoDJ"]));
                    myReport.SetParameterValue("GuiMoDJ", GuiMoDJ);
                    //JSDWName = dv[0]["JSDWName"].ToString();
                    //myReport.SetParameterValue("JSDWName", JSDWName);
                    //XMLXR_JS = dv[0]["XMLXR_JS"].ToString();
                    //myReport.SetParameterValue("XMLXR_JS", XMLXR_JS);
                    //LXDH_JS = dv[0]["LXDH_JS"].ToString();
                    //myReport.SetParameterValue("LXDH_JS", LXDH_JS);
                    XMLXR_KS = dv[0]["XMLXR_KS"].ToString();
                    myReport.SetParameterValue("XMLXR_KS", XMLXR_KS);
                    LXDH_KS = dv[0]["LXDH_KS"].ToString();//+ "/" + dv[0]["SJ_KS"].ToString()
                    myReport.SetParameterValue("LXDH_KS", LXDH_KS);
                    XMFZR = dv[0]["XMFZR"].ToString();
                    myReport.SetParameterValue("XMFZR", XMFZR);
                    XMBH = dv[0]["XMBH"].ToString();
                    //注意处理,如果没有的话,就把编号的前面取出来
                    XMBH = RG_DW.GetXMBH(dv[0]["RowGuid"], dv[0]["DWGuid"], dv[0]["XMAdd"], dv[0]["XMBH"], dv[0]["XMLB"]);
                    myReport.SetParameterValue("XMBH", XMBH);
                    //获取最后一次审核通过意见
                    if (dv[0]["Status"].ToString() == "90")
                    {
                        //myReport.SetParameterValue("SHOpinion", RG_DW.GetLastSHOpinion(Request["RowGuid"], ""));
                        if (dv[0]["TGDate"].ToString() != "")
                        {
                            //myReport.SetParameterValue("TGDate", DateTime.Parse(dv[0]["TGDate"].ToString()).ToString("yyyy年MM月dd日"));
                            DateTime dtPass = DateTime.Parse(dv[0]["TGDate"].ToString());
                            YXQ = "有效期至:" + dtPass.AddYears(2).ToString("yyyy年MM月dd日");
                            myReport.SetParameterValue("TGDate", dtPass.ToString("yyyy年MM月dd日") + "\n" + YXQ);
                        }
                        else
                        {
                            myReport.SetParameterValue("TGDate", "    年  月  日");
                        }
                    }
                    else
                    {
                        //myReport.SetParameterValue("SHOpinion", "");
                        myReport.SetParameterValue("TGDate", "    年  月  日");
                    }
                    //重点注意,要分地区加盖相应的公章,宜兴的就加盖宜兴,江阴的就加盖江阴公章
                    //判断是否是宜兴的或江阴的
                    if (dv[0]["XMAdd"].ToString() == "320281")//江阴
                    {
                        WatermarkImageUrl = Server.MapPath(Request.ApplicationPath + "/HTProject/Pages/Images/江阴合同备案公章.gif");
                    }
                    else if (dv[0]["XMAdd"].ToString() == "320282")//宜兴
                    {
                        WatermarkImageUrl = Server.MapPath(Request.ApplicationPath + "/HTProject/Pages/Images/宜兴合同备案公章.gif");
                    }
                }

                #endregion

                CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
                myReport.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
                myReport.ExportOptions.ExportFormatType      = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
                string thisTime = DateTime.Now.ToString("yyyyMMddHHmmssfff");
                string fileName = thisTime + "XMBA.pdf";
                DiskOpts.DiskFileName = Server.MapPath(Request.ApplicationPath + "/AttachStorage/" + fileName);
                myReport.ExportOptions.DestinationOptions = DiskOpts;
                myReport.Export();
                //判断下状态,如果是已经审核通过了,那么就处理公章,否则直接加载
                if (STATUS != "90")
                {
                    if (this.LoginID == "admin")
                    {
                        string message     = "";
                        string fileNewName = thisTime + "_2XMBA.pdf";
                        string fileNew     = Request.ApplicationPath + "/AttachStorage/" + fileNewName;
                        WatermarkPDF(DiskOpts.DiskFileName, Server.MapPath(fileNew), WatermarkImageUrl, 400, 500, 115, 115, out message, dvRY.Count);
                        Response.Write("<script language=javascript> window.location.href = 'pdfReader.aspx?fileName=" + fileNewName + "'; </script> ");
                    }
                    else
                    {
                        Response.Write("<script language=javascript> window.location.href = 'pdfReader.aspx?fileName=" + fileName + "'; </script> ");
                    }
                }
                else
                {
                    //string WatermarkImageUrl = Server.MapPath(Request.ApplicationPath + "/HTProject/Pages/Images/合同备案公章.gif");
                    string message     = "";
                    string fileNewName = thisTime + "_2XMBA.pdf";
                    string fileNew     = Request.ApplicationPath + "/AttachStorage/" + fileNewName;
                    WatermarkPDF(DiskOpts.DiskFileName, Server.MapPath(fileNew), WatermarkImageUrl, 400, 500, 115, 115, out message, dvRY.Count);
                    Response.Write("<script language=javascript> window.location.href = 'pdfReader.aspx?fileName=" + fileNewName + "'; </script> ");
                }
            }
        }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //先处理下附件文件夹中的备案表,防止过大
                DeleteSignedFile(Server.MapPath(Request.ApplicationPath + "/AttachStorage/"));
                HeTongBeiAn_WS myReport = new HeTongBeiAn_WS();
                string         strSql   = "";
                //先初始化项目信息

                //看看该公司所在的地区

                CRS_BeiAn.Report.FileName = System.Configuration.ConfigurationManager.AppSettings["BeiAnPrint_SW"];// Epoint.Frame.Common.ApplicationOperate.GetConfigValueByName("BeiAnPrint_SW", ""); ;
                //CRS_BeiAn.Report.
                #region
                HeTongInfo ds = new HeTongInfo();
                strSql = "select * from RG_XMAndRY RY where XMGuid='" + Request["RowGuid"] + "' order by substring(RY.ZhuanYeCode,1,4) asc,ddrole desc";
                DataView dvRY = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);

                for (int i = 0; i < dvRY.Count; i++)
                {
                    DataRow dr4;
                    dr4 = ds.Tables["RYOfXM"].NewRow();
                    dr4["ZiZhiText"]   = dvRY[i]["ZiZhiText"].ToString();
                    dr4["ZhuanYeText"] = dvRY[i]["ZhuanYeText"].ToString();
                    dr4["RYName"]      = dvRY[i]["RYName"].ToString();
                    dr4["IDNum"]       = dvRY[i]["IDNum"];//Convert.ToDecimal(
                    dr4["ZhiCheng"]    = DB_CM.GetCodeText_FromHash("职称", Convert.ToString(dvRY[i]["ZhiCheng"]));;
                    dr4["YinZhangNo"]  = dvRY[i]["YinZhangNo"].ToString();
                    dr4["ZhuanYeSX"]   = dvRY[i]["ZhuanYeSX"].ToString();

                    //处理下从事的专业,尽量缩小
                    string ZhuanYeCS = dvRY[i]["ZhuanYeCS"].ToString();

                    dr4["ZhuanYeCS"] = ZhuanYeCS;
                    dr4["GongLing"]  = dvRY[i]["GongLing"];
                    dr4["DDRole"]    = DB_CM.GetCodeText_FromHash("项目角色", Convert.ToString(dvRY[i]["DDRole"]));
                    dr4["OrNo"]      = i + 1;
                    ds.Tables["RYOfXM"].Rows.Add(dr4);
                }

                //HeTongBeiAn oCR = new HeTongBeiAn();
                myReport.SetDataSource(ds.Tables["RYOfXM"]);
                #endregion

                #region 参数
                strSql = "select * from RG_XMBeiAn where RowGuid='" + Request["RowGuid"] + "'";
                DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);

                string XMAdd = "";

                string XMBH   = "";
                string STATUS = "";
                if (dv.Count > 0)
                {
                    strSql = "select * from RG_OUInfo where RowGuid='" + dv[0]["DWGuid"] + "'";
                    DataView dvDW = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
                    if (dvDW.Count > 0)
                    {
                        STATUS = dv[0]["STATUS"].ToString();
                        myReport.SetParameterValue("DWName", dvDW[0]["EnterpriseName"]);
                        myReport.SetParameterValue("DWAddress", dvDW[0]["ZhuCeDi_XX"].ToString());
                        myReport.SetParameterValue("DWYB", dvDW[0]["YouZhengCode"].ToString());
                        myReport.SetParameterValue("DWXZ", dvDW[0]["DanWeiXZ"].ToString());
                        myReport.SetParameterValue("DWFR", dvDW[0]["FaRen"].ToString());
                        myReport.SetParameterValue("DWDH", dvDW[0]["DanWeiTel"].ToString());
                        myReport.SetParameterValue("DWLXR", dvDW[0]["LianXiRen"].ToString());
                        myReport.SetParameterValue("DWLXRDH", dvDW[0]["LianXiRenTel"].ToString());
                        string tb = dv[0]["TJDate"].ToString() == "" ? dv[0]["OperateDate"].ToString() : dv[0]["TJDate"].ToString();
                        myReport.SetParameterValue("TBDate", DateTime.Parse(tb).ToString("yyyy-MM-dd"));
                        myReport.SetParameterValue("FuZaCD", dv[0]["FuZaCD"].ToString());
                        myReport.SetParameterValue("YeWuFW", dv[0]["YeWuFW"].ToString());
                    }
                    else
                    {
                        myReport.SetParameterValue("DWName", "");
                        myReport.SetParameterValue("DWAddress", "");
                        myReport.SetParameterValue("DWYB", "");
                        myReport.SetParameterValue("DWXZ", "");
                        myReport.SetParameterValue("DWFR", "");
                        myReport.SetParameterValue("DWDH", "");
                        myReport.SetParameterValue("DWLXR", "");
                        myReport.SetParameterValue("DWLXRDH", "");
                    }
                    //注意处理,如果没有的话,就把编号的前面取出来
                    XMBH = RG_DW.GetXMBH(dv[0]["RowGuid"], dv[0]["DWGuid"], dv[0]["XMAdd"], dv[0]["XMBH"], dv[0]["XMLB"]);
                    myReport.SetParameterValue("XMBH", XMBH);
                    XMAdd = dv[0]["XMAdd"].ToString();
                    //加区县通过时间和市建设局通过时间
                    //看看有没有市的通过时间,如果有就加在后面,否则加在区县的后面

                    string YXQ = "";
                    if (dv[0]["TGDate"].ToString() == "")
                    {
                        if (dv[0]["QXTG_Date"].ToString() != "")
                        {
                            DateTime dtPass   = DateTime.Parse(dv[0]["QXTG_Date"].ToString());
                            string   qxTGDate = dtPass.ToString("yyyy 年 MM 月 dd 日 ");
                            YXQ = "有效期至:" + dtPass.AddYears(2).ToString("yyyy年MM月dd日");
                            myReport.SetParameterValue("QXTGDate", qxTGDate + "\n" + YXQ);
                        }
                        else
                        {
                            string qxTGDate = "      年    月    日 ";
                            myReport.SetParameterValue("QXTGDate", qxTGDate);
                        }
                        myReport.SetParameterValue("TGDate", "      年    月    日 ");
                    }
                    else
                    {
                        if (dv[0]["QXTG_Date"].ToString() != "")
                        {
                            myReport.SetParameterValue("QXTGDate", DateTime.Parse(dv[0]["QXTG_Date"].ToString()).ToString("yyyy年MM月dd日"));
                        }
                        else
                        {
                            myReport.SetParameterValue("QXTGDate", "      年    月    日 ");
                        }
                        DateTime dtPass = DateTime.Parse(dv[0]["TGDate"].ToString());
                        string   TGDate = dtPass.ToString("yyyy年MM月dd日");
                        YXQ = "有效期至:" + dtPass.AddYears(2).ToString("yyyy年MM月dd日");
                        myReport.SetParameterValue("TGDate", TGDate + "\n" + YXQ);
                    }
                }

                #endregion

                CrystalDecisions.Shared.DiskFileDestinationOptions DiskOpts = new CrystalDecisions.Shared.DiskFileDestinationOptions();
                myReport.ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile;
                myReport.ExportOptions.ExportFormatType      = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat;
                string timeNow  = DateTime.Now.ToString("yyyyMMddHHmmssfff");
                string fileName = timeNow + "XMBA.pdf";
                DiskOpts.DiskFileName = Server.MapPath(Request.ApplicationPath + "/AttachStorage/" + fileName);
                myReport.ExportOptions.DestinationOptions = DiskOpts;
                myReport.Export();

                //判断下状态,如果是已经审核通过了,那么就处理公章,否则直接加载
                if (STATUS != "90")
                {
                    if (this.LoginID == "admin")
                    {
                        string WatermarkImageUrl = Server.MapPath(Request.ApplicationPath + "/HTProject/Pages/Images/合同备案公章.gif");
                        string message           = "";
                        string fileNewName       = timeNow + "_2XMBA.pdf";
                        string fileNew           = Request.ApplicationPath + "/AttachStorage/" + fileNewName;
                        WatermarkPDF(DiskOpts.DiskFileName, Server.MapPath(fileNew), WatermarkImageUrl, 568, 500, 115, 115, out message, XMAdd);
                        Response.Write("<script language=javascript> window.location.href = 'pdfReader.aspx?fileName=" + fileNewName + "'; </script> ");
                    }
                    else
                    {
                        Response.Write("<script language=javascript> window.location.href = 'pdfReader.aspx?fileName=" + fileName + "'; </script> ");
                    }
                }
                else
                {
                    string WatermarkImageUrl = Server.MapPath(Request.ApplicationPath + "/HTProject/Pages/Images/合同备案公章.gif");
                    string message           = "";
                    string fileNewName       = timeNow + "_2XMBA.pdf";
                    string fileNew           = Request.ApplicationPath + "/AttachStorage/" + fileNewName;
                    WatermarkPDF(DiskOpts.DiskFileName, Server.MapPath(fileNew), WatermarkImageUrl, 568, 500, 115, 115, out message, XMAdd);
                    Response.Write("<script language=javascript> window.location.href = 'pdfReader.aspx?fileName=" + fileNewName + "'; </script> ");
                }
            }
        }