Ejemplo n.º 1
0
        public string ReturnProject(string singleProjectID, string workFlowCode)
        {
            //更新最后一次的工程,下次它排前面,方便操作些
            T_SingleProject_BLL spBLL = new T_SingleProject_BLL();
            T_SingleProject_MDL spMDL = spBLL.GetModel(ConvertEx.ToInt(singleProjectID));

            spMDL.LastUserTime = DateTime.Now;   //提交或退回的时间 jdk 2015.03.14

            if (string.Compare(workFlowCode.ToLower(), SystemSet.EumWorkFlowCode.IMPORT_TO.ToString().ToLower(), true) == 0)
            {
                spMDL.Status = 1;   //移交入库环节退回,则更改工程状态为1(正常)
            }
            spBLL.Update(spMDL);


            WorkFlowManage workflowmanage = new WorkFlowManage();

            if (workflowmanage.RollBackProjectWorkFlowStatus(ConvertEx.ToInt(singleProjectID)))
            {
                return(SystemSet._RETURN_SUCCESS_VALUE);
            }
            else
            {
                return(SystemSet._RETURN_FAILURE_VALUE);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try {
                T_SingleProject_MDL singleProMDL = singleProBLL.GetModel(DNTRequest.GetQueryInt("SingleProjectID", 0));
                if (singleProMDL != null)
                {
                    //将指导人员指导环节的所有 [受理]全部 做,这样,除了管理员和受理人员外,其他人都看不到流程下的工程
                    T_WorkFlowDefine_BLL         workFlowDefineBLL = new T_WorkFlowDefine_BLL();
                    IList <T_WorkFlowDefine_MDL> workFlowDefineLT  = workFlowDefineBLL.GetModelList(" SingleProjectID=" +
                                                                                                    singleProMDL.SingleProjectID + " and WorkFlowID in(" + SystemSet._DEFAULT_RECV_WORKFLOWID + ") ");
                    if (workFlowDefineLT != null && workFlowDefineLT.Count > 0)
                    {
                        foreach (T_WorkFlowDefine_MDL wkdMDL in workFlowDefineLT)
                        {
                            wkdMDL.SubmitStatus = 2;//受理完成状态
                            wkdMDL.RecvUserID   = Common.ConvertEx.ToInt(ddlNewUser.SelectValue);
                            wkdMDL.RecvDateTime = DateTime.Now;
                            workFlowDefineBLL.Update(wkdMDL);
                        }
                    }
                    singleProMDL.ChargeUserID = Common.ConvertEx.ToInt(ddlNewUser.SelectValue);
                    singleProBLL.Update(singleProMDL);
                    Common.LogUtil.Info(this, "变更业务指导人员:" + singleProMDL.gcbm + "-------" +
                                        ddlOldUser.SelectText + "-------" + ddlNewUser.SelectText);

                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(),
                                         string.Concat("T_SingleProject_MDL;keyList=", singleProMDL.SingleProjectID, ";gcbm=", singleProMDL.gcbm,
                                                       ";gcmc=", singleProMDL.gcmc, ";UserName="******"UserName"), ";UserID=",
                                                       Common.Session.GetSession("UserID"), "变更业务指导人员(", ddlOldUser.SelectText, "--->", ddlNewUser.SelectText, ")"));
                }
                Common.MessageBox.CloseLayerOpenWeb(this.Page);
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "变更业务指导人员", ex);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 绑定未组卷归档目录
        /// </summary>
        private void BindFileList()
        {
            T_SingleProject_MDL spMDL = singleProjectBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                projectType = spMDL.ProjectType;
                projectName = spMDL.gcmc;

                #region  案卷信息预填充
                lrr.Text  = Common.Session.GetSession("Username");
                lrsj.Text = DateTime.Now.ToString("yyyy-MM-dd");
                ajtm.Text = spMDL.gcmc;
                xh.Text   = (archiveBLL.getMaxArchiveXhBySingleProjectID(singleProjectID) + 10).ToString();
                #endregion

                string  strWhere = "SingleProjectID=" + singleProjectID;
                DataSet ds       = (new T_FileList_BLL()).GetList(strWhere, "bh asc");    //取当前工程的所有归档目录
                if (ds.Tables.Count > 0)
                {
                    strWhere = string.Empty;

                    DataTable outDT = ds.Tables[0].Copy();
                    outDT.Clear();
                    Recursion(ds.Tables[0], 0, 0, ref outDT);
                    ds.Tables.Clear();
                    ds.Tables.Add(outDT);

                    //Status==100表示已组卷,以手动页数为主
                    strWhere = " IsFolder=1 OR (IsFolder=0 AND MustSubmitFlag=1 AND Status<>100 " + strWhere + ")";

                    //if (strWhere != "1=1")
                    //{
                    //过滤一些不要的
                    DataView dv = ds.Tables[0].Copy().DefaultView;
                    dv.RowFilter = strWhere;
                    dv.Sort      = "bh asc";
                    if (dv.Count != ds.Tables[0].Rows.Count)
                    {
                        ds.Tables[0].Clear();
                        ds.Tables.RemoveAt(0);
                        ds.Tables.Add(dv.ToTable());
                    }
                    //}

                    TreeNode tNode1 = new TreeNode();
                    tNode1.Text  = "未组卷文件列表:" + projectName;;
                    tNode1.Value = "0";

                    DsToTreeNode(ds.Tables[0], 0, tNode1);
                    TreeView1.Nodes.Clear();
                    TreeView1.Nodes.Add(tNode1);
                    TreeView1.ExpandDepth = 1;
                }
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            T_SingleProject_MDL spMDL = singleProjectBLL.GetModel(Common.ConvertEx.ToInt(ddlSingleProject.SelectValue));

            if (spMDL != null)
            {
                BindFileList(spMDL.SingleProjectID.ToString(), spMDL.gcmc);
                BindTreeYZJ(spMDL.SingleProjectID.ToString(), spMDL.gcmc);
            }
        }
        public T_SingleProject_MDL GetModule(int SingleProjectID)
        {
            T_SingleProject_MDL mdl = new T_SingleProject_MDL();

            if (SingleProjectID > 0)
            {
                mdl = singleProjectBLL.GetModel(SingleProjectID);
            }
            object obj = Comm.GetValueToObject(mdl, tablemain);

            return((T_SingleProject_MDL)obj);
        }
        public bool SingleProjectRK(string singleProjectID)
        {
            T_SingleProject_BLL spBll = new T_SingleProject_BLL();
            T_SingleProject_MDL spMdl = spBll.GetModel(ConvertEx.ToInt(singleProjectID));

            if (spMdl != null)
            {
                spMdl.Status = 3721;
                spBll.Update(spMdl);
                return(true);
            }
            return(false);
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SingleProjectID = DNTRequest.GetQueryString("SingleProjectID");
            ProjectType     = DNTRequest.GetQueryString("ProjectType");

            Ajax.Utility.RegisterTypeForAjax(typeof(CompanyReg3_1Edit1));
            MyAddInit();
            if (!IsPostBack)
            {
                AREA_CODE.BindDdlArea(true);                                                //区域
                ctrlCompanyRegBaseInfo3_11.DataBindEx(ConvertEx.ToInt(SingleProjectID));    //工程相关信息
                ctrlCompanyRegBaseInfo3_1Ext1.DataBindEx(ConvertEx.ToInt(SingleProjectID)); //专业记载

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.ADD)
                {
                    string js = "document.getElementById('ctl00_Main_ctrlCompanyRegBaseInfo3_11_gcbm').value='自动生成';";
                    ClientScript.RegisterStartupScript(this.GetType(), "IsSuccess", "<script type=\"text/javascript\">" + js + "</script>");

                    ctrlDropDownConstructionProject1.CompanyId = Common.Session.GetSession("CompanyID");//项目信息
                }
                else
                {
                    ctrlDropDownConstructionProject1.enable = false;
                }

                ctrlDropDownConstructionProject1.DataBindEx();
                ctrlArchiveFormType1.DataBindEx();
                ctrlArchiveFormType1.SelectValue = ProjectType;
                ctrlArchiveFormType1.Enabled     = false;

                if (ConvertEx.ToInt(SingleProjectID) > 0)
                {
                    T_SingleProject_MDL spMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(SingleProjectID));
                    if (spMDL != null)
                    {
                        ctrlDropDownConstructionProject1.SelectValue = spMDL.ConstructionProjectID.ToString();
                        ctrlArchiveFormType1.SelectValue             = spMDL.ProjectType;
                    }
                }

                if (!String.IsNullOrWhiteSpace(DNTRequest.GetString("ConstructionID")))
                {
                    ctrlDropDownConstructionProject1.SelectValue = DNTRequest.GetString("ConstructionID");
                }

                if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW)
                {
                    btnSave.Visible = false;
                }
            }
        }
Ejemplo n.º 8
0
        public bool RKLookPDFFlag(string singleProjectID)
        {
            bool flag = true;
            T_SingleProject_MDL singleProjectMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(singleProjectID));

            if (singleProjectMDL != null)
            {
                if (ConvertEx.ToInt(singleProjectMDL.Status) >= 3721 && !SystemSet._RKLOOKPDFFLAG)
                {
                    flag = false;
                }
            }
            return(flag);
        }
        protected void btnSingleProjectInfo_Click(object sender, EventArgs e)
        {//11
            List <string> sellist = ctrlGridEx1.GetSelects();

            if (sellist.Count > 0)
            {
                T_SingleProject_MDL model = (new T_SingleProject_BLL()).GetModel(ConvertEx.ToInt(sellist[0].ToString()));
                string url = "/companymanage/companyreg3_" +
                             PublicModel.GetFileTypeForProjectType(model.ProjectType) + "edit.aspx?action=view&ProjectType=" +
                             model.ProjectType + "&id=" + sellist[0].ToString();
                ClientScript.RegisterStartupScript(Page.GetType(), "open15", "<script type='text/javascript'>openCommonWindowScroll('" + url + "',950,600);</script>");
                //string url = "/companymanage/companyreg3_" + model.ProjectType + "edit.aspx?action=view&id=" + sellist[0].ToString();
                //ClientScript.RegisterStartupScript(Page.GetType(), "open15", "<script type='text/javascript'>openCommonWindowScroll('" + url + "',950,600);</script>");
            }
        }
Ejemplo n.º 10
0
        public bool RKLookPDFFlag(string singleProjectID)
        {
            bool flag = true;
            T_SingleProject_BLL singleProjectBLL = new T_SingleProject_BLL();
            T_SingleProject_MDL singleProjectMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(singleProjectID));

            if (singleProjectMDL != null)
            {
                if (ConvertEx.ToInt(singleProjectMDL.Status) >= 3721 && !SystemSet._RKLOOKPDFFLAG &&
                    singleProjectMDL.WorkFlow_DoStatus == (int)SystemSet.WorkFlowStatus.IMPORT_TO)
                {
                    flag = false;
                }
            }
            return(flag);
        }
        public bool UpdateSingleProjectStatus(string SingleProjectID)
        {
            bool flag = false;
            T_SingleProject_MDL singleMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(SingleProjectID));

            if (singleMDL != null && singleMDL.Status == 3722 && singleMDL.WorkFlow_DoStatus == PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.IMPORT_TO.ToString()))    //工程已入库,工程流程处于 移交入库
            {
                singleMDL.Status = 3721;
                singleProjectBLL.Update(singleMDL);
                flag = true;

                PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_SingleProject;key=", SingleProjectID,
                                                                                            ";gcbm=", singleMDL.gcbm, ";gcmc=", singleMDL.gcmc, ";工程重新入库"));
            }
            return(flag);
        }
Ejemplo n.º 12
0
        //绑定归档目录
        private void BindGridView(int pageIndex)
        {
            T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                projecttype = spMDL.ProjectType;

                //取当前工程的所有归档目录
                string strWhere = " SingleProjectID=" + singleProjectID;

                //显示声像节点 固定为S类
                strWhere += " AND BH like 'S%' ";

                if (!String.IsNullOrWhiteSpace(rdbFileStatus.SelectValue) && rdbFileStatus.SelectValue != "0")
                {
                    strWhere += " AND Status=" + rdbFileStatus.SelectValue;
                }
                if (!String.IsNullOrWhiteSpace(ddlFileType.SelectValue) && ddlFileType.SelectValue != "0")
                {
                    strWhere += " AND BH like '" + ddlFileType.SelectValue + "%' ";
                }

                Session["FileInfostrWhere"] = strWhere;

                if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
                {
                    pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                    ViewState["CurrentPageIndex"] = pageIndex;
                }
                else
                {
                    pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
                }

                DataTable dt = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;
                AspNetPager.AlwaysShow = true;
                AspNetPager.PageSize   = pageSize;

                AspNetPager.RecordCount      = itemCount;
                AspNetPager.CurrentPageIndex = pageIndex;

                rpData.DataSource = dt;
                rpData.DataBind();
            }
        }
        public string DeleteSingleProject(string SingleProjectID)
        {
            string flag = SystemSet._RETURN_SUCCESS_VALUE;

            try {
                T_SingleProject_MDL singleMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(SingleProjectID));
                if (singleMDL != null)
                {
                    new T_Other_BLL().DeleteCompanyOther(SingleProjectID);

                    PublicModel.writeLog(SystemSet.EumLogType.DelData.ToString(), string.Concat("T_SingleProject;key=", SingleProjectID,
                                                                                                ";ProjectType=", singleMDL.ProjectType, ";gcbm=", singleMDL.gcbm, ";gcmc=", singleMDL.gcmc, ";删除工程及其关联表信息"));
                }
            } catch (Exception ex) {
                flag = SystemSet._RETURN_FAILURE_VALUE + ex.Message;
                Common.LogUtil.Debug(this, "删除工程", ex);
            }
            return(flag);
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(Rwfp));
            singleProjectid = DNTRequest.GetQueryString("SingleProjectID");
            workFlowID      = DNTRequest.GetQueryString("WorkFlowID");

            if (!IsPostBack)
            {
                ddlUser.BindDataByCompanyID("", true, SystemSet._ROLECODE_CHARGEUSER, Common.Session.GetSession("OLD_AREA_CODE"));
                ctrlCompanyQucikReg.DataBindEx(ConvertEx.ToInt(singleProjectid));
                ctrlCompanyQucikReg.DisabledControl();

                T_SingleProject_MDL singleProjectMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(singleProjectid));
                if (singleProjectMDL != null)
                {
                    ddlUser.SelectValue = singleProjectMDL.ChargeUserID.ToString();
                }
            }
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                SingleProjectID = Common.ConvertEx.ToInt(Common.DNTRequest.GetString("SingleProjectID"));
                T_SingleProject_BLL spBLL = new T_SingleProject_BLL();
                T_SingleProject_MDL spMDL = spBLL.GetModel(SingleProjectID);

                List <T_Company_MDL> ltCompany = new T_Company_BLL().GetModelList("CompanyID=(select CompanyID from T_Construction_Project where ConstructionProjectID=" + Common.ConvertEx.ToString(spMDL.ConstructionProjectID) + ")");
                Comm.SetValueToPage(spMDL, this.tbl);

                gczt.Text = PublicModel.getSingleProjectStatusNameByStatus(ConvertEx.ToInt(spMDL.Status));//工程状态
                if (ltCompany.Count > 0)
                {
                    companyName.Text       = ltCompany[0].CompanyName;                                  //单位名称
                    ChargeUserName.Text    = ltCompany[0].ChargeUserName;                               //项目负责人
                    ContactPerson_Tel.Text = ltCompany[0].ContactPerson + "(" + ltCompany[0].Tel + ")"; //联系人 ,联系电话
                }
                GetWorkFlowHtml(spMDL);
            }
        }
Ejemplo n.º 16
0
        public string HookUpCompanyAndUser(int SingleProjectID, int UserID, int RoleID,
                                           int CompanyID, string ProjectType, string UserName, string CompanyType)
        {
            string flag = SystemSet._RETURN_SUCCESS_VALUE;

            try {
                string iSignaturePdf      = "0"; //文件是否需要签章
                string iSignatureWorkFlow = "0"; //是否按签章流程签章
                if (ConvertEx.ToBool(SystemSet._ISIGNATUREPDF))
                {
                    iSignaturePdf      = "1";
                    iSignatureWorkFlow = "1";
                }

                PublicModel.AddSingleProjectUser(SingleProjectID, RoleID, UserID);                                                                //加入到工程用户表中去
                PublicModel.AddSingleProjectCompany(SingleProjectID, CompanyID);                                                                  //加入到工程公司表中去
                userOper.CopyFileList(CompanyID, UserID, UserName, SingleProjectID, ProjectType, CompanyType, iSignaturePdf, iSignatureWorkFlow); //用户添加归档目录

                #region 关联更新工程表的 施工,监理单位信息
                T_SingleProject_MDL singleMDL  = singleBLL.GetModel(SingleProjectID);
                T_Company_MDL       companyMDL = companyBLL.GetModel(CompanyID);
                if (singleMDL != null && companyMDL != null)
                {
                    if (ConvertEx.ToInt(CompanyType) == SystemSet._SGCOMPANYINFO)
                    {
                        singleMDL.sgdw = companyMDL.CompanyName;
                    }
                    else if (ConvertEx.ToInt(CompanyType) == SystemSet._JLCOMPANYINFO)
                    {
                        singleMDL.jldw = companyMDL.CompanyName;
                    }
                    singleBLL.Update(singleMDL);
                }
                #endregion
            } catch (Exception ex) {
                flag = SystemSet._RETURN_FAILURE_VALUE + ex.Message;
                Common.LogUtil.Debug(this, "工程相关表关联(工程用户表,工程公司表)", ex);
            }
            return(flag);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// 绑定文件
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                singleProjectNo = spMDL.gcbm;
                projecttype     = spMDL.ProjectType;

                //取当前工程的所有归档目录
                string strWhere = " SingleProjectID=" + singleProjectID;

                //不显示声像节点 //jdk 2014.11.16
                strWhere += " AND BH not like '%S%' ";

                string ownerFileTmp = Common.Session.GetSession("OwnerFileTmp");
                if (ownerFileTmp.Length > 0)
                {
                    ownerFileTmp += ",";
                    string[] spfileTmp = ownerFileTmp.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                    if (spfileTmp.Length > 0)
                    {
                        string tempStrWhere = string.Empty;
                        foreach (var bh in spfileTmp)
                        {
                            if (tempStrWhere == string.Empty)
                            {
                                tempStrWhere = " and (bh like '" + bh + "%'";
                            }
                            else
                            {
                                tempStrWhere += " or bh like '" + bh + "%'";
                            }
                        }
                        tempStrWhere += ")";
                        strWhere     += tempStrWhere;
                    }
                }

                if (!String.IsNullOrWhiteSpace(txtMyCode.Text.Trim()))
                {
                    strWhere += " AND MyCode LIKE '%" + txtMyCode.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(txtTitle.Text.Trim()))
                {
                    strWhere += " AND TITLE LIKE '%" + txtTitle.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(rdbFileStatus.SelectValue) && rdbFileStatus.SelectValue != "0")
                {
                    strWhere += " AND Status=" + rdbFileStatus.SelectValue;
                }
                if (!String.IsNullOrWhiteSpace(ddlFileType.SelectValue) && ddlFileType.SelectValue != "0")
                {
                    strWhere += " AND BH like '" + ddlFileType.SelectValue + "%' ";
                }

                if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
                {
                    pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                    ViewState["CurrentPageIndex"] = pageIndex;
                }
                else
                {
                    pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
                }

                DataTable dt = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;
                AspNetPager.AlwaysShow = true;
                AspNetPager.PageSize   = pageSize;

                AspNetPager.RecordCount      = itemCount;
                AspNetPager.CurrentPageIndex = pageIndex;

                rpData.DataSource = dt;
                rpData.DataBind();
            }
        }
Ejemplo n.º 18
0
        public string ExportToJson(int singleProjectID)
        {
            try {
                string jsonFileName = string.Empty;

                T_FileList_BLL      fileListBLL = new T_FileList_BLL();
                T_SingleProject_MDL singleMDL   = singleProjectBLL.GetModel(singleProjectID);
                if (singleMDL != null)
                {
                    if (singleMDL.WorkFlow_DoStatus != PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()))
                    {
                        return(SystemSet._RETURN_FAILURE_VALUE);
                    }

                    XmlDocument    xmldoc  = new XmlDocument();
                    XmlDeclaration xmldecl = xmldoc.CreateXmlDeclaration("1.0", "utf-8", null);
                    xmldoc.AppendChild(xmldecl);

                    XmlElement RESULT = xmldoc.CreateElement("RESULT");
                    xmldoc.AppendChild(RESULT);

                    AppendChildXML(RESULT, xmldoc.CreateElement("GCMC"), singleMDL.gcmc);
                    AppendChildXML(RESULT, xmldoc.CreateElement("GCBM"), singleMDL.gcbm);
                    AppendChildXML(RESULT, xmldoc.CreateElement("SINGLEPROJECTID"), singleMDL.SingleProjectID.ToString());
                    AppendChildXML(RESULT, xmldoc.CreateElement("USERID"), Session["UserID"].ToString());
                    AppendChildXML(RESULT, xmldoc.CreateElement("OUT_DATE"), DateTime.Now.ToString("yyyy-MM-dd"));
                    AppendChildXML(RESULT, xmldoc.CreateElement("ZRR"), Session["CompanyName"].ToString());

                    XmlElement FILETYPES = xmldoc.CreateElement("FILETYPES");
                    RESULT.AppendChild(FILETYPES);
                    string strWhere = "singleprojectid=" + singleProjectID + " and DefaultCompanyType=" +
                                      Common.Session.GetSession("CompanyType") + " and BH NOT LIKE 'S%' ";

                    DataTable dt = fileListBLL.GetList(600, strWhere, " BH asc").Tables[0];
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        foreach (DataRow row in dt.Rows)
                        {
                            XmlElement FILETYPE = xmldoc.CreateElement("FILETYPE");
                            FILETYPE.InnerText = string.Concat(ConvertEx.ToString(row["BH"]), "-", ConvertEx.ToString(row["Title"]));

                            strWhere = " isfolder=1  and BH NOT LIKE 'S%' and pid=" + ConvertEx.ToString(row["RECID"]) + " ";

                            if (fileListBLL.GetCount(strWhere) < 1)
                            {
                                FILETYPE.SetAttribute("SELECTED", "1");
                            }
                            else
                            {
                                FILETYPE.SetAttribute("SELECTED", "0");
                            }

                            FILETYPE.SetAttribute("FID", ConvertEx.ToString(row["PID"]));
                            FILETYPE.SetAttribute("PID", ConvertEx.ToString(row["OldRecID"]));

                            FILETYPES.AppendChild(FILETYPE);
                        }
                    }

                    jsonFileName = String.Concat(SystemSet._RETURN_SUCCESS_VALUE,
                                                 DateTime.Now.ToString("yyyyMMddHHmmss").ToString(), ".json");
                    xmldoc.Save(Server.MapPath("../Upload/TempReport/" + jsonFileName));
                }
                return(jsonFileName);
            } catch (Exception ex) {
                return(SystemSet._RETURN_FAILURE_VALUE + ex.Message);
            }
        }
Ejemplo n.º 19
0
        public string AllotSingleProject(string SingleProjectID, string ChargeUserID, string WorkFlowID)
        {
            try {
                //激活工程
                T_SingleProject_MDL singleProjectMDL = singleProjectBLL.GetModel(ConvertEx.ToInt(SingleProjectID));

                singleProjectMDL.Status = 1;
                int CompanyID = 0;

                #region 没有工程编号则生成
                if (String.IsNullOrEmpty(singleProjectMDL.gcbm))
                {
                    T_Other_BLL otherBLL = new T_Other_BLL();
                    singleProjectMDL.gcbm = otherBLL.GetNewEngineerID();
                    singleProjectBLL.Update(singleProjectMDL);       //产生工程号

                    T_Construction_Project_BLL       cpBLL = new T_Construction_Project_BLL();
                    Model.T_Construction_Project_MDL cpMDL = cpBLL.GetModel(singleProjectMDL.ConstructionProjectID);
                    if (cpMDL != null)
                    {
                        CompanyID = cpMDL.CompanyID;                  //建设单位ID
                        if (String.IsNullOrEmpty(cpMDL.xmh))
                        {
                            cpMDL.xmh = otherBLL.GetNewProjectID();
                            cpBLL.Update(cpMDL);                      //更新项目号
                        }
                    }
                }
                #endregion

                #region 激活用户
                T_UsersInfo_BLL userBLL = new T_UsersInfo_BLL();
                T_UsersInfo_MDL userMDL = userBLL.GetModel(singleProjectMDL.CompanyUserID);
                if (userMDL != null)
                {
                    userMDL.IsValid = true;
                    userBLL.Update(userMDL);
                }
                #endregion

                #region 修改工程分配信息
                if (singleProjectMDL != null)
                {
                    singleProjectMDL.AllotDate    = DateTime.Now;                                         //分配时间
                    singleProjectMDL.AllotUserID  = ConvertEx.ToInt(Common.Session.GetSession("UserId")); //分配人员
                    singleProjectMDL.ChargeUserID = ConvertEx.ToInt(ChargeUserID);                        //业务指导人员

                    singleProjectBLL.Update(singleProjectMDL);
                }
                #endregion

                #region 添加建设单位归档目录
                string iSignaturePdf      = "0"; //文件是否需要签章
                string iSignatureWorkFlow = "0"; //是否按签章流程签章
                if (ConvertEx.ToBool(SystemSet._ISIGNATUREPDF))
                {
                    iSignaturePdf      = "1";
                    iSignatureWorkFlow = "1";
                }
                new UserOperate().CopyFileList(CompanyID, singleProjectMDL.CompanyUserID, "",
                                               singleProjectMDL.SingleProjectID, singleProjectMDL.ProjectType, iSignaturePdf, iSignatureWorkFlow);
                #endregion

                #region 把业务指导人员用户加入到这个工程用户中去
                T_UsersInfo_MDL ChargeUserMDL = userBLL.GetModel(Common.ConvertEx.ToInt(ChargeUserID));
                PublicModel.AddSingleProjectUser(singleProjectMDL.SingleProjectID, ChargeUserMDL);
                #endregion

                #region 相关流程的用户也需要加入,否则流程走不下去===现在有了受理,可以达到这个功能,不需要加了。让用户受理下来。受理还没做完呢?
                SingleProjectUser  projectRole = new SingleProjectUser();
                BLL.T_WorkFlow_BLL workFlowBLL = new T_WorkFlow_BLL();
                DataSet            workFlowDS  = workFlowBLL.GetList(" OrderIndex=1 ");
                if (workFlowDS.Tables.Count > 0)
                {
                    foreach (DataRow row in workFlowDS.Tables[0].Rows)
                    {
                        projectRole.Update(singleProjectMDL.SingleProjectID, Common.ConvertEx.ToInt(row["RoleID"]), Common.ConvertEx.ToInt(row["UserID"]));
                    }
                }
                #endregion

                #region 发送邮件通知客户
                if (SystemSet._ACCEPTSINGLE_SENDEMAILFLAG)
                {
                    string strMsgBody = "您好!<br />";
                    strMsgBody += "您报建的工程:" + singleProjectMDL.gcmc + ",已确认通过,产生的工程编号是:" +
                                  singleProjectMDL.gcbm + ",您现在已经可以通过注册时的账号密码登记系统操作了!";

                    T_UsersInfo_MDL CompanyUserMDL = userBLL.GetModel(singleProjectMDL.CompanyUserID);
                    Common.CSendEmail.SendEmail("档案馆", CompanyUserMDL.EMail, "工程报建确认通知", strMsgBody, "");
                }
                #endregion

                #region  提交到下一个流程
                WorkFlowManage workflowmanage = new WorkFlowManage();
                workflowmanage.GoNextProjectWorkFlowSataus(singleProjectMDL.SingleProjectID, ConvertEx.ToInt(WorkFlowID));
                #endregion

                #region 将指导人员指导环节的所有 [受理]全部 做,这样,除了管理员和受理人员外,其他人都看不到流程下的工程
                T_WorkFlowDefine_BLL         workFlowDefineBLL = new T_WorkFlowDefine_BLL();
                IList <T_WorkFlowDefine_MDL> workFlowDefineLT  = workFlowDefineBLL.GetModelList(" SingleProjectID=" +
                                                                                                singleProjectMDL.SingleProjectID + " and WorkFlowID in(" + SystemSet._DEFAULT_RECV_WORKFLOWID + ") ");
                if (workFlowDefineLT != null && workFlowDefineLT.Count > 0)
                {
                    foreach (T_WorkFlowDefine_MDL wkdMDL in workFlowDefineLT)
                    {
                        wkdMDL.SubmitStatus = 2;//受理完成状态
                        wkdMDL.RecvUserID   = Common.ConvertEx.ToInt(ChargeUserID);
                        wkdMDL.RecvDateTime = DateTime.Now;
                        workFlowDefineBLL.Update(wkdMDL);
                    }
                }
                #endregion

                return(singleProjectMDL.gcbm);
            } catch (Exception ex) {
                return(SystemSet._RETURN_FAILURE_VALUE + ex.Message);
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            T_SingleProject_MDL spModel = new T_SingleProject_MDL();

            spModel = ctrlCompanyRegBaseInfo3_11.GetModule(ConvertEx.ToInt(SingleProjectID));

            a_single_project_MDL a_Single_Mdl = new a_single_project_MDL();

            a_Single_Mdl    = ctrlCompanyRegBaseInfo3_1Ext1.GetModule(ConvertEx.ToInt(SingleProjectID));
            a_Single_Mdl.fz = spModel.fz;

            if (spModel != null)
            {
                if (spModel.SingleProjectID <= 0 || (CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.ADD)
                {
                    #region 添加工程信息
                    spModel.ConstructionProjectID = ConvertEx.ToInt(ctrlDropDownConstructionProject1.SelectValue);
                    spModel.ProjectType           = ctrlArchiveFormType1.SelectValue;
                    spModel.AREA_CODE             = AREA_CODE.SelectValue;
                    spModel.gcbm = "";

                    string UserID = "";
                    if (Common.Session.GetSession("tUserID") != "")
                    {
                        UserID = Common.Session.GetSession("tUserID");
                    }
                    else if (Common.Session.GetSession("UserID") != "")
                    {
                        UserID = Common.Session.GetSession("UserID");
                    }
                    spModel.CompanyUserID = Common.ConvertEx.ToInt(UserID);
                    spModel.CreateDate    = DateTime.Now;
                    spModel.Status        = 0;
                    int tmpSingleProjectID = singleProjectBLL.Add(spModel);
                    #endregion

                    #region 添加工程流程环节
                    new T_WorkFlowDefine_BLL().AddWorkFlowDefine(tmpSingleProjectID, spModel.AREA_CODE);
                    #endregion

                    #region 更新当前用户为本工程管理员
                    T_UsersInfo_BLL userBll = new T_UsersInfo_BLL();
                    T_UsersInfo_MDL userMdl = userBll.GetModel(Common.ConvertEx.ToInt(UserID));
                    userMdl.IsLeader = true;
                    userBll.Update(userMdl);
                    #endregion

                    #region 把此用户加入到这个工程用户中去
                    SingleProjectUser projectRole = new SingleProjectUser();
                    projectRole.Update(tmpSingleProjectID, userMdl.RoleID, userMdl.UserID);
                    #endregion

                    #region 加入到工程->公司表中去
                    T_SingleProjectCompany_MDL spcMDL = new T_SingleProjectCompany_MDL();
                    spcMDL.SingleProjectID = tmpSingleProjectID;
                    spcMDL.CompanyID       = Common.Session.GetSessionInt("CompanyID");
                    T_SingleProjectCompany_BLL spcBLL = new T_SingleProjectCompany_BLL();
                    spcBLL.Add(spcMDL);
                    #endregion

                    #region 房屋专业记载
                    a_Single_Mdl.SingleProjectID = tmpSingleProjectID;
                    if (asingleProjectBLL.Exists(tmpSingleProjectID))
                    {
                        asingleProjectBLL.Update(a_Single_Mdl);
                    }
                    else
                    {
                        asingleProjectBLL.Add(a_Single_Mdl);
                    }
                    #endregion

                    #region 日志
                    PublicModel.writeLog(SystemSet.EumLogType.AddData.ToString(), string.Concat("T_SingleProject;key=", tmpSingleProjectID,
                                                                                                ";ProjectType=", spModel.ProjectType, ";gcbm=", spModel.gcbm, ";gcmc=", spModel.gcmc));
                    #endregion
                }
                else
                {
                    #region 更新工程信息
                    singleProjectBLL.Update(spModel);
                    #endregion

                    #region  判断工程,如果没有专业记载,则新增,否则修改
                    if (ConvertEx.ToInt(a_Single_Mdl.SingleProjectID) > 0)
                    {
                        asingleProjectBLL.Update(a_Single_Mdl);
                    }
                    else
                    {
                        a_Single_Mdl.SingleProjectID = spModel.SingleProjectID;
                        asingleProjectBLL.Add(a_Single_Mdl);
                    }
                    #endregion

                    #region 日志
                    PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_SingleProject;key=", spModel.SingleProjectID,
                                                                                                ";ProjectType=", spModel.ProjectType, ";gcbm=", spModel.gcbm, ";gcmc=", spModel.gcmc));
                    #endregion
                }
            }
            Common.MessageBox.CloseLayerOpenWeb(this.Page);
        }
        private void DataBindEx()
        {
            T_SingleProject_MDL  projectmdl   = singleProjectBLL.GetModel(ConvertEx.ToInt(HSingleProjectID.Value));
            c_single_project_MDL a_projectmdl = csingleProjectBLL.GetModel(ConvertEx.ToInt(HSingleProjectID.Value));

            if (projectmdl != null && a_projectmdl != null)
            {
                projectmdl.fz = a_projectmdl.fz;

                StringBuilder singlePoint = new StringBuilder();
                StringBuilder ghxkz       = new StringBuilder();
                StringBuilder sgxkz       = new StringBuilder();
                StringBuilder other       = new StringBuilder();
                StringBuilder allStr      = new StringBuilder();

                #region 获取显示工程所有的坐标信息,按OrderIndex排序
                List <T_SingleProject_Point_MDL> ltPoint = new T_SingleProject_Point_BLL().GetModelList("SingleProjectID=" + projectmdl.SingleProjectID);
                if (ltPoint != null && ltPoint.Count > 0)
                {
                    singlePoint.Append("<table class=\"zpxxxj\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> ");
                    singlePoint.Append("<tr>");
                    singlePoint.Append("   <td colspan=\"4\" style=\"height: 10px\"><strong>工程坐标信息预览</strong></td>");
                    singlePoint.Append("</tr>");
                    int index = 0;
                    foreach (T_SingleProject_Point_MDL pintMDL in ltPoint)
                    {
                        index++;
                        singlePoint.Append(" <tr>");
                        singlePoint.Append("     <td class=\"ww\">X" + index + "坐标:</td>");
                        singlePoint.Append("     <td>");
                        singlePoint.Append("         <input type=\"text\" readonly=\"readonly\" value=\"" + pintMDL.X + "\" title=\"" + pintMDL.X + "\" class=\"dd\"  />");
                        singlePoint.Append("     </td>");
                        singlePoint.Append("     <td class=\"ww\">Y" + index + "坐标:</td>");
                        singlePoint.Append("     <td>");
                        singlePoint.Append("         <input  type=\"text\" readonly=\"readonly\" value=\"" + pintMDL.Y + "\" title=\"" + pintMDL.Y + "\" class=\"dd\"  />");
                        singlePoint.Append("     </td>");
                        singlePoint.Append(" </tr> ");
                    }
                    singlePoint.Append("</table>");
                    ltPointHtml.Text = singlePoint.ToString();
                }
                #endregion

                #region 获取工程对应的所有上传证件的附件
                List <T_FileAttach_MDL> lt_ftMdl = new T_FileAttach_BLL().GetModelList("PriKeyValue=" + projectmdl.SingleProjectID);
                foreach (T_FileAttach_MDL ftMdl in lt_ftMdl)
                {
                    if (ftMdl.AttachCode == "ghxkz")
                    {
                        ghxkz.Append("&nbsp;&nbsp;<a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a>&nbsp;");
                    }
                    else if (ftMdl.AttachCode == "sgxkz")
                    {
                        sgxkz.Append("&nbsp;&nbsp;<a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a>&nbsp;");
                    }
                    else if (ftMdl.AttachCode == "other")
                    {
                        other.Append("&nbsp;&nbsp;<a style=\"color:black;\" href=\"" + ftMdl.AttachPath + "\" title='点击查看' target=\"_blank\">" + ftMdl.AttachName + "</a>&nbsp;");
                    }
                }
                if (ghxkz.Length > 0 || sgxkz.Length > 0 || other.Length > 0)
                {
                    allStr.Append("<table class=\"zpxxxj\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
                    allStr.Append("<tr>");
                    allStr.Append("<td colspan=\"4\" style=\"height: 10px\">");
                    allStr.Append("<strong>文号项扫描件预览</strong>");
                    allStr.Append("</td>");
                    allStr.Append("</tr>");
                }
                if (ghxkz.Length > 0 || sgxkz.Length > 0)
                {
                    allStr.Append("<tr>");
                    if (ghxkz.Length > 0)
                    {
                        allStr.Append("<td class=\"ww\">规划许可证号:</td>");
                        allStr.Append("<td>");
                        allStr.Append(ghxkz.ToString());
                        allStr.Append("</td>");
                    }
                    if (sgxkz.Length > 0)
                    {
                        allStr.Append("<td class=\"ww\">施工许可证号:</td>");
                        allStr.Append("<td>");
                        allStr.Append(sgxkz.ToString());
                        allStr.Append("</td>");
                    }
                    allStr.Append("</tr>");
                }
                if (other.Length > 0)
                {
                    allStr.Append("<tr>");
                    allStr.Append("  <td class=\"ww\">其它证件附件:");
                    allStr.Append("</td>");
                    allStr.Append(" <td colspan=\"3\" style=\"word-break: break-all;\">");
                    allStr.Append(other.ToString());
                    allStr.Append("  </td>");
                    allStr.Append("</tr>");
                }
                allStr.Append("</table>");
                ltImage.Text = allStr.ToString();
                #endregion
            }
            Comm.SetValueToPage(projectmdl, tablemain);
            if (jsdw.Text == "")
            {
                jsdw.Text = Common.Session.GetSession("CompanyName");
            }
        }
Ejemplo n.º 22
0
        //绑定归档目录
        private void BindGridView(int pageIndex)
        {
            T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                singleProjectNo = spMDL.gcbm;
                projecttype     = spMDL.ProjectType;

                //取当前工程的所有归档目录
                string strWhere = " SingleProjectID=" + singleProjectID;

                //不显示声像节点 //jdk 2014.11.16
                strWhere += " AND BH not like '%S%' ";

                if (PublicModel.isCompany() && !PublicModel.isLeader())   //监理或施工只能看到自己的
                {
                    strWhere += " and operateuserid=" + Common.Session.GetSession("UserID");
                }

                if (ConvertEx.ToBool(SystemSet._ISIGNATUREPDF))
                {
                    if (!string.IsNullOrWhiteSpace(ddliSignaturePdf.SelectedValue))
                    {
                        strWhere += " AND iSignaturePdf=" + ddliSignaturePdf.SelectedValue + "";   //是否需要签章
                    }
                    if (!string.IsNullOrWhiteSpace(ddlSignatureFinishFlag.SelectedValue))          //签章完成状态
                    {
                        string tempStrWhere        = " and iSignaturePdf=1 and IsFolder=0 and (SELECT COUNT(1) from T_FileList_SignatureTmp f1 where f1.FileListID=T_FileList.OldRecID)>0 ";
                        int    signatureFinishFlag = ConvertEx.ToInt(ddlSignatureFinishFlag.SelectedValue); //签章是否完成标记 那已签章完成的记录跟需要签章的记录比对.
                        if (signatureFinishFlag == 1)                                                       //签章完成
                        {
                            tempStrWhere += "and (SELECT COUNT(1) from T_FileList_SignatureLog f0 where f0.FileListID=T_FileList.FileListID and f0.SignatureFinishFlag=1)";
                            tempStrWhere += ">=(SELECT COUNT(1) from T_FileList_SignatureTmp f1 where f1.FileListID=T_FileList.OldRecID) ";
                            strWhere     += tempStrWhere;
                        }
                        else if (signatureFinishFlag == 0)    //签章未完成
                        {
                            tempStrWhere += "and (SELECT COUNT(1) from T_FileList_SignatureLog f0 where f0.FileListID=T_FileList.FileListID and f0.SignatureFinishFlag=1)";
                            tempStrWhere += "<(SELECT COUNT(1) from T_FileList_SignatureTmp f1 where f1.FileListID=T_FileList.OldRecID) ";
                            strWhere     += tempStrWhere;
                        }
                    }
                }

                if (!String.IsNullOrWhiteSpace(txtMyCode.Text.Trim()))
                {
                    strWhere += " AND MyCode LIKE '%" + txtMyCode.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(txtTitle.Text.Trim()))
                {
                    strWhere += " AND TITLE LIKE '%" + txtTitle.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(rdbFileStatus.SelectValue) && rdbFileStatus.SelectValue != "0")
                {
                    strWhere += " AND Status=" + rdbFileStatus.SelectValue;
                }
                if (!String.IsNullOrWhiteSpace(ddlCompany.SelectValue) && ddlCompany.SelectValue != "0")
                {
                    T_Company_BLL compBLL = new T_Company_BLL();
                    T_Company_MDL compMDL = compBLL.GetModel(ConvertEx.ToInt(ddlCompany.SelectValue));
                    if (compMDL != null)
                    {
                        strWhere += " AND DefaultCompanyType=" + compMDL.CompanyType + "";
                    }
                }
                if (!String.IsNullOrWhiteSpace(ddlFileType.SelectValue) && ddlFileType.SelectValue != "0")
                {
                    strWhere += " AND BH like '" + ddlFileType.SelectValue + "%' ";
                }

                Session["FileInfostrWhere"] = strWhere;

                if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
                {
                    pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                    ViewState["CurrentPageIndex"] = pageIndex;
                }
                else
                {
                    pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
                }

                DataTable dt = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);;
                AspNetPager.AlwaysShow = true;
                AspNetPager.PageSize   = pageSize;

                AspNetPager.RecordCount      = itemCount;
                AspNetPager.CurrentPageIndex = pageIndex;

                rpData.DataSource = dt;
                rpData.DataBind();
            }
        }
Ejemplo n.º 23
0
        /// <summary>
        /// 绑定归档目录
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGridView(int pageIndex)
        {
            T_SingleProject_MDL spMDL = spBLL.GetModel(Common.ConvertEx.ToInt(singleProjectID));

            if (spMDL != null)
            {
                projectType = spMDL.ProjectType;

                string strWhere = " SingleProjectID=" + singleProjectID;
                strWhere += " AND BH not like '%S%' ";                      //不显示声像节点

                if (PublicModel.isSuperAdmin() || !PublicModel.isCompany()) //Leo 超级管理员看全部
                {
                }
                else if (spMDL != null && spMDL.CompanyUserID == Common.ConvertEx.ToInt(Common.Session.GetSession("UserID")))    //Leo 工程管理员也看全部,档案馆的人也可以看全部
                {
                }
                else
                {
                    strWhere += " AND operateuserid=" + Common.Session.GetSession("UserID");
                }

                if (!String.IsNullOrWhiteSpace(txtMyCode.Text.Trim()))
                {
                    strWhere += " AND MyCode LIKE '%" + txtMyCode.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(txtTitle.Text.Trim()))
                {
                    strWhere += " AND TITLE LIKE '%" + txtTitle.Text.Trim() + "%'";
                }
                if (!String.IsNullOrWhiteSpace(rdbFileStatus.SelectValue) && rdbFileStatus.SelectValue != "0")
                {
                    strWhere += " AND Status=" + rdbFileStatus.SelectValue;
                }
                if (!String.IsNullOrWhiteSpace(ddlCompany.SelectValue) && ddlCompany.SelectValue != "0")
                {
                    T_Company_BLL compBLL = new T_Company_BLL();
                    T_Company_MDL compMDL = compBLL.GetModel(ConvertEx.ToInt(ddlCompany.SelectValue));
                    if (compMDL != null)
                    {
                        strWhere += " AND DefaultCompanyType=" + compMDL.CompanyType + "";
                    }
                }
                if (!String.IsNullOrWhiteSpace(ddlFileType.SelectValue) && ddlFileType.SelectValue != "0")
                {
                    strWhere += " AND BH like '" + ddlFileType.SelectValue + "%' ";
                }
                if (!String.IsNullOrWhiteSpace(ddlChangeFile.SelectedValue))
                {
                    var changeFile = ddlChangeFile.SelectedValue;
                    if (changeFile == "1")  //有变更
                    {
                        strWhere += " AND ISNULL(version,0)=(SELECT TOP 1 ISNULL(f.RollBackCount,0)from T_WorkFlowDefine f where f.SingleProjectID=" + singleProjectID + " ";
                        strWhere += "AND f.WorkFlowID=" + PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()) + ") ";
                    }
                    if (changeFile == "0")  //无变更
                    {
                        strWhere += " AND ISNULL(version,0) !=(SELECT TOP 1 ISNULL(f.RollBackCount,0)from T_WorkFlowDefine f where f.SingleProjectID=" + singleProjectID + " ";
                        strWhere += "AND f.WorkFlowID=" + PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()) + ") ";
                    }
                }

                if (ViewState["CurrentPageIndex"] == null && Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex")) > 0)
                {
                    pageIndex = Common.ConvertEx.ToInt(DNTRequest.GetQueryString("PageIndex"));
                    ViewState["CurrentPageIndex"] = pageIndex;
                }
                else
                {
                    pageIndex = ConvertEx.ToInt(ViewState["CurrentPageIndex"]);
                }
                DataTable dt = fileListBLL.GetListPaging(strWhere, pageSize, pageIndex, out itemCount);

                AspNetPager.AlwaysShow = true;
                AspNetPager.PageSize   = pageSize;

                AspNetPager.RecordCount      = itemCount;
                AspNetPager.CurrentPageIndex = pageIndex;

                rpData.DataSource = dt;
                rpData.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(SubmittedInfo));

            singleProjectID = DNTRequest.GetQueryString("singleProjectID"); //工程ID
            reportType      = DNTRequest.GetQueryString("reportType");      //报表类型

            if (!IsPostBack)
            {
                T_SingleProject_MDL singMDL = singleBLL.GetModel(ConvertEx.ToInt(singleProjectID));
                if (singMDL != null)
                {
                    ReadyCheckBookCode.Text = singMDL.gcbm;
                    jsdw.Text = singMDL.jsdw;
                }

                if (string.Compare(reportType, "rkz", true) == 0)
                {
                    //ltTitle.Text = SystemSet._APPAREA + "建设工程档案认可意见书";
                    ltReadyCheckBookCode.Text     = "预验收编号:";
                    ReadyCheckBookCode.labelTitle = ltReadyCheckBookCode.Text;
                    TableRowShow(7, Table1.Rows.Count);
                }
                else if (string.Compare(reportType, "zms", true) == 0)
                {
                    //ltTitle.Text = SystemSet._APPAREA + "建设工程档案移交证明书";
                    ltReadyCheckBookCode.Text     = "验收编号:";
                    ReadyCheckBookCode.labelTitle = ltReadyCheckBookCode.Text;
                    TableRowShow(2, 7);
                }
                else if (string.Compare(reportType, "zrs", true) == 0)
                {
                    //ltTitle.Text = SystemSet._APPAREA + "建设工程档案移交证明书";
                    ltReadyCheckBookCode.Text     = "责任书编号:";
                    ReadyCheckBookCode.labelTitle = ltReadyCheckBookCode.Text;
                    TableRowShow(2, Table1.Rows.Count);
                }
                string strWhere = "SingleProjectID='" + singleProjectID + "' and lower(CodeType)='" + reportType.ToLower() + "'";
                IList <T_ReadyCheckBook_MDL> ltMdl = readBLL.GetModelList(strWhere);
                if (ltMdl != null && ltMdl.Count > 0)
                {
                    T_ReadyCheckBook_MDL readMDL = ltMdl[0];
                    txtTotalScroll.Text     = ConvertEx.ToString(readMDL.TOTAL_SCROLL);
                    txtCharacterScroll.Text = ConvertEx.ToString(readMDL.CHARACTER_SCROLL);
                    txtPicScroll.Text       = ConvertEx.ToString(readMDL.PIC_SCROLL);
                    txtPhotoPageCount.Text  = ConvertEx.ToString(readMDL.PHOTO_COUNT);
                    txtRadioCount.Text      = ConvertEx.ToString(readMDL.RADIO_COUNT);
                    txtOtherMaterial.Text   = readMDL.OTHER_MATERIAL;
                    txtDirectoryScroll.Text = ConvertEx.ToString(readMDL.Directory_SCROLL);
                    txtDirectoryPage.Text   = ConvertEx.ToString(readMDL.Directory_PAGE_COUNT);
                    ReadyCheckBookCode.Text = readMDL.ReadyCheckBookCode;
                    jsdwfzr_Name.Text       = readMDL.jsdwfzr_Name;
                    jsdwfzr_Tel.Text        = readMDL.jsdwfzr_Tel;
                    ArchiveUserName.Text    = readMDL.ArchiveUserName;
                    ArchiveUser_Tel.Text    = readMDL.ArchiveUser_Tel;

                    ViewState["objModel"] = readMDL;
                }
                else
                {
                    DataSet ds = new T_Other_BLL().GetArchiveInfo(singleProjectID);
                    if (ds.Tables.Count > 0)
                    {
                        DataTable table = ds.Tables[0];
                        txtTotalScroll.Text     = Common.ConvertEx.ToString(table.Rows[0]["archiveCount"]);             //案卷总卷数
                        txtCharacterScroll.Text = Common.ConvertEx.ToString(table.Rows[0]["wz"]);                       //文字 卷数
                        txtPicScroll.Text       = Common.ConvertEx.ToString(table.Rows[0]["tzz"]);                      //图纸 卷数
                    }
                }
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try {
                #region 建设单位信息
                T_Company_MDL companyMDL = new T_Company_MDL();

                companyMDL              = Comm.GetValueToObject(companyMDL, table_Company) as T_Company_MDL;
                companyMDL.CreateDate   = DateTime.Now;
                companyMDL.IsCompany    = true;
                companyMDL.CreateIP     = Common.DNTRequest.GetIP();
                companyMDL.CreateUserID = 0;//公司创建人

                int companyID = companyBLL.Add(companyMDL);
                #endregion

                if (companyID > 0)
                {
                    #region 项目信息
                    T_Construction_Project_MDL cpModel = new T_Construction_Project_MDL();
                    T_Construction_Project_BLL cpBll   = new T_Construction_Project_BLL();

                    cpModel.CompanyID = companyID;                     //所属单位
                    cpModel.xmmc      = xmmc.Text;                     //项目名称
                    cpModel.xmh       = string.Empty;                  //项目号
                    if (jgsj.Text.Length > 0)
                    {
                        cpModel.jgrq = Common.ConvertEx.ToDate(jgsj.Text);  //开工时间
                    }
                    cpModel.jgsj        = jgsj.Text;
                    cpModel.ProjectType = ProjectType.SelectValue;
                    int constructionProjectID = cpBll.Add(cpModel);
                    #endregion

                    #region 工程信息
                    T_SingleProject_MDL singleProjectMDL = new T_SingleProject_MDL();

                    singleProjectMDL                       = Comm.GetValueToObject(singleProjectMDL, tablemain) as T_SingleProject_MDL;
                    singleProjectMDL.AREA_CODE             = AREA_CODE.SelectValue;
                    singleProjectMDL.ConstructionProjectID = constructionProjectID;
                    singleProjectMDL.CreateDate            = DateTime.Now;
                    singleProjectMDL.Status                = 0;                      //初始为0,未分配
                    singleProjectMDL.jsdw                  = companyMDL.CompanyName; //建设单位,是当前单位
                    singleProjectMDL.gcdd                  = gcdd.Text.Trim();
                    singleProjectMDL.WorkFlow_DoStatus     = 0;

                    int singleProjectID = singleProjectBLL.Add(singleProjectMDL); //工程ID
                    UploadFile(singleProjectID);                                  //上传证书

                    #endregion

                    #region 用户信息 ,角色默认给先前定义好的建设单位角色
                    T_UsersInfo_MDL userMDL = new T_UsersInfo_MDL();
                    userMDL               = (T_UsersInfo_MDL)Comm.GetValueToObject(userMDL, tLoginInfo);
                    userMDL.RoleID        = roleBLL.GetRoleIdByRoleCode(SystemSet._ROLECODE_JSCOMPANY, singleProjectMDL.AREA_CODE);
                    userMDL.Passwd        = DESEncrypt.Encrypt(Passwd.Text);
                    userMDL.UserType      = SystemSet.EumUserType.CompanyUser.ToString();
                    userMDL.UserName      = userMDL.LoginName;
                    userMDL.CompanyID     = companyID;
                    userMDL.Createdate    = DateTime.Now;
                    userMDL.LastLoginTime = DateTime.Now;
                    userMDL.IsLeader      = true;
                    userMDL.IsValid       = false;
                    userMDL.Createdby     = "工程报建产生";
                    int userID = userBLL.Add(userMDL);
                    #endregion

                    #region 添加工程用户关联信息
                    PublicModel.AddSingleProjectUser(singleProjectID, userMDL.RoleID, userID);
                    #endregion

                    #region 添加工程公司关联信息
                    PublicModel.AddSingleProjectCompany(singleProjectID, companyID);
                    #endregion

                    #region 添加工程流程环节
                    new T_WorkFlowDefine_BLL().AddWorkFlowDefine(singleProjectID, singleProjectMDL.AREA_CODE);
                    #endregion

                    #region 更新工程表的 CompanyUserID为当前建设单位用户ID
                    singleProjectMDL = singleProjectBLL.GetModel(singleProjectID);
                    singleProjectMDL.CompanyUserID = userID;
                    singleProjectBLL.Update(singleProjectMDL);
                    #endregion

                    #region 报建完成提示信息
                    this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), "IsSuccess",
                                                                 "<script>"
                                                                 + " layer.alert('您已经成功注册,但您注册的信息,必需确认后才可以登录使用。请耐心等待,或致电:" + SystemSet._QUICKREGTEL + "', { btnAlign: 'c' }, function (i) {"
                                                                 + "     var index = parent.layer.getFrameIndex(window.name);"
                                                                 + "     parent.layer.close(index);"
                                                                 + "}); "
                                                                 + "</script>");
                    #endregion
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "建设单位工程报建", ex);
                Common.MessageBox.FnLayerAlert(this.Page, "工程报建保存失败:" + ex.Message);
            }
        }
Ejemplo n.º 26
0
        protected void GetWorkFlowHtml(T_SingleProject_MDL spMDL)
        {
            if (spMDL != null)
            {
                StringBuilder strBuilder = new StringBuilder();

                DateTime createDt = ConvertEx.ToDate(spMDL.CreateDate);
                strBuilder.Append("<h2 class=\"first\"><a href=\"#nogo\">" + createDt.ToString("yyyy") + "年</a></h2> ");
                strBuilder.Append("<li> ");
                strBuilder.Append("    <h3>" + createDt.ToString("MM.dd") + "<span>" + createDt.ToString("yyyy") + "</span></h3> ");
                strBuilder.Append("    <dl> ");
                strBuilder.Append("        <dt>工程开始报建");
                strBuilder.Append("                <span>" + spMDL.jsdw + " </span> ");
                strBuilder.Append("        </dt> ");
                strBuilder.Append("    </dl>");
                strBuilder.Append("</li> ");

                DataSet ds = new T_WorkFlowDefine_BLL().GetProjectListByWorkFlowAndUser(spMDL.SingleProjectID.ToString());
                if (ds.Tables[0].Rows.Count > 0)
                {
                    DataTable dt = ds.Tables[0].Copy();
                    dt.Clear();
                    Recursion(ds.Tables[0], 0, ref dt);

                    foreach (DataRow row in dt.Rows)
                    {
                        string recvDateTime = String.IsNullOrEmpty(ConvertEx.ToString(row["RecvDateTime"])) ? "" :
                                              Convert.ToDateTime(row["RecvDateTime"]).ToString("yyyy-MM-dd HH:mm:ss");
                        string submitDateTime = String.IsNullOrEmpty(ConvertEx.ToString(row["SubmitDateTime"])) ? "" :
                                                Convert.ToDateTime(row["SubmitDateTime"]).ToString("yyyy-MM-dd HH:mm:ss");

                        if (ConvertEx.ToInt(row["DoStatus"]) == 1 && ConvertEx.ToInt(spMDL.Status) < 3722)
                        {
                            strBuilder.Append("<li class=\"green\">");
                        }
                        else
                        {
                            strBuilder.Append("<li>");
                        }

                        if (recvDateTime.Length > 0)
                        {
                            strBuilder.Append("    <h3>" + ConvertEx.ToDate(recvDateTime).ToString("MM.dd") + "<span>" +
                                              ConvertEx.ToDate(recvDateTime).ToString("yyyy") + "</span></h3> ");
                        }
                        else
                        {
                            strBuilder.Append("    <h3>&nbsp;<span>&nbsp;</span></h3> ");
                        }

                        strBuilder.Append("    <dl>");
                        strBuilder.Append("        <dt>" + ConvertEx.ToString(row["WorkFlowName"]) + "");
                        strBuilder.Append("                <span>");
                        if (!string.IsNullOrWhiteSpace(row["RecvUserName"].ToString()) && !string.IsNullOrWhiteSpace(recvDateTime))
                        {
                            strBuilder.Append(String.Concat("受理人:", Convert.ToString(row["RecvUserName"]), "&nbsp;&nbsp;", "受理时间:", recvDateTime));
                        }
                        if (!string.IsNullOrWhiteSpace(row["SubmitUserName"].ToString()) && !string.IsNullOrWhiteSpace(submitDateTime))
                        {
                            strBuilder.Append(String.Concat("<br/>", "提交人:", Convert.ToString(row["SubmitUserName"]), "&nbsp;&nbsp;", "提交时间:", submitDateTime));
                        }
                        strBuilder.Append("                </span>");
                        strBuilder.Append("        </dt> ");
                        strBuilder.Append("    </dl> ");
                        strBuilder.Append("</li> ");
                    }
                }

                if (ConvertEx.ToInt(spMDL.Status) == 3722 && spMDL.Rksj != null)
                {
                    strBuilder.Append("<li class=\"green\"> ");
                    strBuilder.Append("    <h3>" + ConvertEx.ToDate(spMDL.Rksj).ToString("MM.dd") + "<span>" + ConvertEx.ToDate(spMDL.Rksj).ToString("yyyy") + "</span></h3> ");
                    strBuilder.Append("    <dl> ");
                    strBuilder.Append("        <dt>工程档案数据已移交到库房");
                    strBuilder.Append("                <span>" + ConvertEx.ToDate(spMDL.Rksj).ToString("yyyy-MM-dd HH:mm:ss") + " </span> ");
                    strBuilder.Append("        </dt> ");
                    strBuilder.Append("    </dl>");
                    strBuilder.Append("</li> ");
                }
                ltWorkFlow.Text = strBuilder.ToString();
            }
        }