Beispiel #1
0
        /// <summary>
        /// 保存,重置密码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try {
                string        defualtPwd = SystemSet._DEFAULTPWD;
                StringBuilder strMsgBody = new StringBuilder();
                strMsgBody.Append("您好,您的<a href=\"" + SystemSet._APPURL + "\" target=\"_parent\">");
                strMsgBody.Append("《" + SystemSet._APPAREA + SystemSet._APPTITLE + "》</a>");
                strMsgBody.Append("的登录密码已经重置为:" + defualtPwd + ",请登录系统后重新修改密码!");
                if (Common.CSendEmail.SendEmail("档案馆", txtEmail.Text.Trim(), "账号密码重置", strMsgBody.ToString(), ""))
                {
                    T_UsersInfo_MDL userMDL = userBLL.GetModelList("lower(LoginName)='" + txtUserName.Text.ToLower().Trim() + "'").FirstOrDefault();
                    if (userMDL != null)
                    {
                        userMDL.Passwd = DESEncrypt.Encrypt(defualtPwd);
                        userBLL.Update(userMDL);

                        PublicModel.writeLog(SystemSet.EumLogType.UpdData.ToString(), string.Concat("T_UsersInfo;key=", userMDL.UserID,
                                                                                                    ";UserType=", userMDL.UserType, ";CompanyID=", userMDL.CompanyID, ";UserName="******";LoginName=", userMDL.LoginName, ";找回密码"));

                        RegisterStartupScriptString("密码已经发送到您的邮箱,请及时修改!");
                    }
                }
                else
                {
                    RegisterStartupScriptString("邮件发送失败!");
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "找回密码失败", ex);
                RegisterStartupScriptString("找回密码失败,请联系管理员!");
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Ajax.Utility.RegisterTypeForAjax(typeof(MyTaskList));
     if (!IsPostBack)
     {
         workFlowID = PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString());
         BindGrid(1);
     }
 }
Beispiel #3
0
        /// <summary>
        /// 退出系统
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string logOut(HttpContext context)
        {
            PublicModel.writeLog(SystemSet.EumLogType.LogOut.ToString(), ";用户退出系统");

            context.Session.Abandon();
            context.Session.Clear();
            System.Web.Security.FormsAuthentication.SignOut();
            return(SystemSet._RETURN_SUCCESS_VALUE);
        }
Beispiel #4
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="WorkFlowID"></param>
        /// <param name="pageInde"></param>
        private void BindGrid(int pageIndex)
        {
            BLL.T_WorkFlow_BLL   wfBLL = new T_WorkFlow_BLL();
            Model.T_WorkFlow_MDL wfMDL = wfBLL.GetModel(workFlowID);
            workFlowCode = wfMDL.WorkFlowCode;

            string sqlWhere = string.Empty;

            if (PublicModel.isSuperAdmin())                                                             //管理员管理员获取所有工程
            {
                sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";     //加区域了。
            }
            else if (PublicModel.isArchiveUser())                                                       //档案馆用户看自己的
            {
                sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'"; //加区域了。
            }

            if (!String.IsNullOrEmpty(txtGcmc.Text))
            {
                sqlWhere += " AND gcmc like '%" + txtGcmc.Text + "%'";
            }
            if (!String.IsNullOrEmpty(txtGcbm.Text))
            {
                sqlWhere += " AND gcbm like '%" + txtGcbm.Text + "%'";
            }
            DataTable dt = null;

            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"]);
            }

            if (PublicModel.isSuperAdmin())
            {
                dt = flowDefineBLL.GetLHSignatureListPaging(workFlowID.ToString(), false, "", "", sqlWhere, pageSize, pageIndex, out itemCount);
            }
            else
            {
                dt = flowDefineBLL.GetLHSignatureListPaging(workFlowID.ToString(), Common.Session.GetSessionBool("IsCompany"),
                                                            Common.Session.GetSession("RoleID"), Common.Session.GetSession("UserID"), sqlWhere, pageSize, pageIndex, out itemCount);
            }

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

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

            gvData.DataSource = dt;
            gvData.DataBind();
        }
Beispiel #5
0
        protected void Application_Error(object sender, EventArgs e)
        {
            //记录系统出现的异常 数据库和log4net
            Exception LastError  = Server.GetLastError();
            String    ErrMessage = LastError.ToString();
            String    Message    = "Url " + Request.Path + " Error: " + ErrMessage;

            PublicModel.writeLog(SystemSet.EumLogType.ErrorBug.ToString(), Message);
            Common.LogUtil.Error(this, Message);
        }
        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>");
            }
        }
Beispiel #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Ajax.Utility.RegisterTypeForAjax(typeof(LHSignatureProjectList));
            workFlowID = PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString());
            if (!IsPostBack)
            {
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtGcmc")))
                {
                    txtGcmc.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtGcmc"));
                }
                if (!String.IsNullOrWhiteSpace(DNTRequest.GetQueryString("txtGcbm")))
                {
                    txtGcbm.Text = Server.UrlDecode(DNTRequest.GetQueryString("txtGcbm"));
                }

                BindGrid(1);
            }
        }
Beispiel #8
0
        public string SubMitProject(string singleProjectID, string workFlowID, string workFlowDefineID)
        {
            Model.T_SingleProject_MDL spMDL = (new BLL.T_SingleProject_BLL()).GetModel(ConvertEx.ToInt(singleProjectID));
            BLL.T_FileList_BLL        flBLL = new T_FileList_BLL();
            DataSet ds2 = flBLL.GetList("SingleProjectID=" + singleProjectID);

            if (!String.IsNullOrEmpty(spMDL.gcbm) && ds2.Tables.Count > 0 && ds2.Tables[0].Rows.Count > 0)
            {
                //窗口接收提交的时候,更新该工程所有案卷下的文件序号,根据文件编号排序更新
                if (ConvertEx.ToInt(workFlowID) == PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.WINRECV.ToString()))
                {
                    new T_Archive_BLL().updateFileOrderIndexBySingleProjectID(singleProjectID);
                }

                BLL.T_WorkFlowDefine_BLL   wkBLL = new T_WorkFlowDefine_BLL();
                Model.T_WorkFlowDefine_MDL wkMDL = wkBLL.GetModel(ConvertEx.ToInt(workFlowDefineID));

                if (String.IsNullOrEmpty(wkMDL.SubmitCellPath))  //有些地方不需要填申请单的
                {
                    WorkFlowManage workflowmanage = new WorkFlowManage();
                    if (workflowmanage.GoNextProjectWorkFlowSataus(ConvertEx.ToInt(singleProjectID), ConvertEx.ToInt(workFlowID)))
                    {
                        return(SystemSet._RETURN_SUCCESS_VALUE);
                    }
                    else
                    {
                        return(SystemSet._RETURN_FAILURE_VALUE);
                    }
                }
                else      //填申请单的未做
                {
                    return(SystemSet._RETURN_SUCCESS_VALUE);
                }
            }
            else
            {
                return("请选分配任务!");
            }
        }
Beispiel #9
0
        public string InsertFileData(string strXml)
        {
            string rtMsg = string.Empty;

            if (!myHeader.ValideUser(myHeader.UserName, myHeader.PassWord))
            {
                rtMsg = "无权访问WebService,凭证错误!";
                return(rtMsg);
            }
            try {
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(strXml);
                XmlNode xmlNode = doc.SelectSingleNode("FILELIST");

                T_SingleProject_MDL singleProjectMDL = new T_SingleProject_BLL().GetModel(
                    ConvertEx.ToInt(xmlNode["SINGLEPROJECTID"].InnerText));
                if (singleProjectMDL != null && singleProjectMDL.WorkFlow_DoStatus != PublicModel.getWorkFlowIdByWorkFlowCode(SystemSet.EumWorkFlowCode.FILEREG.ToString()))
                {
                    rtMsg = "failure:在线工程必须处在[文件登记]环节才可以导入筑业信息包";
                    return(rtMsg);
                }

                DataTable dt = fileBLL.GetList("FROM_SID='" + xmlNode["SID"].InnerText + "'").Tables[0];
                if (dt != null && dt.Rows.Count > 0)
                {
                    fileBLL.Delete(ConvertEx.ToInt(dt.Rows[0]["FileListID"]));
                    string oldPdfPath = String.Concat(ConvertEx.ToString(dt.Rows[0]["RootPath"]), "\\", xmlNode["SINGLEPROJECTID"].InnerText,
                                                      "\\", "MPDF", "\\", ConvertEx.ToString(dt.Rows[0]["PDFFilePath"]));
                    if (System.IO.File.Exists(oldPdfPath))
                    {
                        System.IO.File.Delete(oldPdfPath);
                    }
                }
                rtMsg = InsertFileList(xmlNode);
            } catch (Exception ex) {
                rtMsg = "failure:" + ex.Message;
            }
            return(rtMsg);
        }
Beispiel #10
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);
            }
        }
Beispiel #11
0
 public bool CheckPassword(string Pwd)
 {
     return(PublicModel.CheckAccountOrPwdValidity(Pwd));
 }
Beispiel #12
0
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public string getUserInfo(HttpContext context)
        {
            try {
                if (context.Request.Form["username"] == null || context.Request.Form["password"] == null)
                {
                    return("账号或密码为空!");
                }

                T_UsersInfo_BLL userinfobll = new T_UsersInfo_BLL();

                string strPrivateKey = string.Empty;
                using (StreamReader reader = new StreamReader(context.Server.MapPath("/RsaKey/PrivateKey.xml"))) {
                    strPrivateKey = reader.ReadToEnd();
                }

                RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
                rsa.FromXmlString(strPrivateKey);

                byte[] result = rsa.Decrypt(UserLoginGather.HexStringToBytes(context.Request.Form["password"]), false);
                System.Text.ASCIIEncoding enc = new ASCIIEncoding();
                string rsaPwd = enc.GetString(result);

                string loginString = "UPPER(loginname)='" + Common.Common.SqlSafe(context.Request.Form["username"]).ToUpper()
                                     + "' and passwd='" + DESEncrypt.Encrypt(rsaPwd) + "' ";

                List <T_UsersInfo_MDL> userinfomdl = userinfobll.GetModelList(loginString);
                if (userinfomdl.Count > 0)
                {
                    if (userinfomdl[0].IsValid == true)
                    {
                        T_Company_BLL compBLL = new T_Company_BLL();
                        T_Company_MDL compMDL = compBLL.GetModel(userinfomdl[0].CompanyID);
                        if (compMDL != null)
                        {
                            context.Session["IsCompany"]     = compMDL.IsCompany.ToString().ToLower();
                            context.Session["CompanyName"]   = compMDL.CompanyName;
                            context.Session["OLD_AREA_CODE"] = compMDL.AREA_CODE;
                            context.Session["AREA_CODE"]     = "";
                            if (compMDL.IsCompany.ToString().ToLower() == "false")     //只有档案馆,需要区域信息,建设单位等都不要过虑
                            {
                                string myArea_Code    = compMDL.AREA_CODE;
                                string myArea_CodeNew = compMDL.AREA_CODE;
                                for (int i1 = myArea_Code.Length - 1; i1 > 0; i1--)
                                {
                                    if (myArea_Code[i1].ToString() == "0")
                                    {
                                        myArea_CodeNew = myArea_Code.Substring(0, i1);
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                                context.Session["AREA_CODE"] = myArea_CodeNew;
                            }
                            context.Session["CompanyType"] = compMDL.CompanyType;
                        }
                        else
                        {
                            return(SystemSet._RETURN_FAILURE_VALUE + ":单位信息不存在!");
                        }

                        BLL.T_SystemInfo_BLL   systemInfoBLL = new T_SystemInfo_BLL();
                        Model.T_SystemInfo_MDL systemInfoMDL = systemInfoBLL.GetModel(compMDL.CompanyType);
                        if (systemInfoMDL == null)
                        {
                            return(SystemSet._RETURN_FAILURE_VALUE + ":单位类型字典不存在!");
                        }

                        context.Session["CompanyTypeName"] = systemInfoMDL.SystemInfoName;
                        context.Session["CompanyTypeCode"] = systemInfoMDL.SystemInfoCode;
                        context.Session["SystemInfoID"]    = systemInfoMDL.SystemInfoID;
                        context.Session["MyParentID"]      = systemInfoMDL.ParentID;

                        context.Session["UserID"]       = userinfomdl[0].UserID;
                        context.Session["LoginName"]    = userinfomdl[0].LoginName;
                        context.Session["UserName"]     = userinfomdl[0].UserName;
                        context.Session["RoleID"]       = userinfomdl[0].RoleID;
                        context.Session["CompanyID"]    = userinfomdl[0].CompanyID;
                        context.Session["IsLeader"]     = userinfomdl[0].IsLeader;
                        context.Session["SuperAdmin"]   = userinfomdl[0].IsSuperAdmin;
                        context.Session["OwnerFileTmp"] = userinfomdl[0].OwnerFileTmp;         //外协单位用户

                        T_Role_MDL roleMDL = new T_Role_BLL().GetModel(userinfomdl[0].RoleID); //签章用
                        if (roleMDL != null)
                        {
                            context.Session["RoleName"] = roleMDL.RoleName;
                            context.Session["RoleCode"] = roleMDL.RoleCode;
                        }

                        TimeSpan ts      = new TimeSpan(8760, 0, 0);
                        DateTime expired = DateTime.Today.Add(ts);
                        HttpContext.Current.Response.Cookies["LoginName"].Value   = context.Server.UrlEncode(userinfomdl[0].LoginName);
                        HttpContext.Current.Response.Cookies["LoginName"].Expires = expired;

                        //修改最后登录时间
                        userinfomdl[0].LastLoginTime = DateTime.Now;
                        userinfobll.Update(userinfomdl[0]);

                        PublicModel.writeLog(SystemSet.EumLogType.LogIn.ToString(), ";用户登录系统");
                        return(SystemSet._RETURN_SUCCESS_VALUE);
                    }
                    else
                    {
                        return("如果您已经成功注册,请等待确认后再登录!");
                    }
                }
                else
                {
                    return("用户账号或密码错误!");
                }
            } catch (Exception ex) {
                Common.LogUtil.Debug(this, "用户登录BUG", ex);
                return("系统异常,请稍后再试");
            }
        }
        /// <summary>
        /// 创建页面控件
        /// </summary>
        private void CreatePage()
        {
            DataTable roleDt = roleRightBLL.GetList("RoleID=" + Common.Session.GetSession("RoleID")).Tables[0];

            string RoleID    = Common.Session.GetSession("RoleID");
            string UserID    = Common.Session.GetSession("UserID");
            string Area_Code = string.Empty;

            if (PublicModel.isSuperAdmin())   //超级管理员,可以看全部
            {
                RoleID    = "";
                Area_Code = Common.Session.GetSession("Area_Code");
            }
            else
            {
                Area_Code = Common.Session.GetSession("OLD_AREA_CODE");
            }
            DataSet ds = workFlowBLL.GetWorkFlowList(RoleID, UserID, Area_Code, Common.Session.GetSessionBool("IsCompany"));

            DataTable dt = new DataTable();    //对数据集按照父子关系排序

            dt.Columns.Add("WorkFlowID");
            dt.Columns.Add("WorkFlowName");
            dt.Columns.Add("DetailCount");
            dt.Columns.Add("roleid");
            dt.Columns.Add("userid");
            dt.Columns.Add("UseForCompany");
            dt.Columns.Add("OrderIndex");
            dt.Columns.Add("DescriptionToArchive");
            dt.Columns.Add("DescriptionToCompany");
            OrderDs(dt, ds, "0");

            StringBuilder strBuilder = new StringBuilder();
            int           index      = 0;

            foreach (DataRow row in dt.Rows)
            {
                index++;

                string description = string.Empty;    //流程说明
                if (PublicModel.isCompany())
                {
                    description = row["DescriptionToCompany"].ToString();
                }
                else
                {
                    description = row["DescriptionToArchive"].ToString();
                }

                string strClick = string.Empty;
                strBuilder.Append("  <li class=\"thumb1\"><a href=\"#\">");
                bool isShowDetailCount = false;
                if (PublicModel.isSuperAdmin() || isIncludeWorkFlow(roleDt, ConvertEx.ToInt(row["WorkFlowID"])))
                {
                    isShowDetailCount = true;
                    strClick          = " onclick=\"parent.addCustomIframe('MyTaskList.aspx?WorkFlowID=" +
                                        ConvertEx.ToInt(row["WorkFlowID"]) + "','83995083" +
                                        ConvertEx.ToInt(row["WorkFlowID"]) + "','" +
                                        ConvertEx.ToString(row["WorkFlowName"]) + "')\" ";
                    strBuilder.Append("     <img " + strClick + " src=\"../Javascript/Layer/image/lc" + index.ToString("d3") + ".png\" />");
                }
                else
                {
                    strBuilder.Append("     <img src=\"../Javascript/Layer/image/hc" + index.ToString("d3") + ".png\" />");
                }
                strBuilder.Append("     <div class=\"title\">");
                if (!PublicModel.isCompany() || isShowDetailCount)
                {
                    isShowDetailCount = false;
                    strBuilder.Append("         <span>(" + ConvertEx.ToString(row["DetailCount"]) + ")</span><br />");
                }
                strBuilder.Append("         " + ConvertEx.ToString(row["WorkFlowName"]) + "");
                strBuilder.Append("     </div>");
                strBuilder.Append("     <p  " + strClick + " > ");
                strBuilder.Append(description);
                strBuilder.Append("     </p> ");
                strBuilder.Append(" </a>");
                strBuilder.Append("     <div class=\"dd" + index.ToString("d2") + "\"></div>");
                strBuilder.Append(" </li>");
            }
            ltWorkFlow.Text = strBuilder.ToString();
        }
Beispiel #14
0
        /// <summary>
        /// 绑定数据
        /// </summary>
        /// <param name="pageIndex"></param>
        private void BindGrid(int pageIndex)
        {
            BLL.T_WorkFlow_BLL   wfBLL = new T_WorkFlow_BLL();
            Model.T_WorkFlow_MDL wfMDL = wfBLL.GetModel(ConvertEx.ToInt(workFlowID));
            workFlowCode = wfMDL.WorkFlowCode;

            string sqlWhere = string.Empty;

            if (PublicModel.isSuperAdmin())       //管理员管理员获取所有工程
            {
                sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("AREA_CODE") + "%'";
            }
            else if (PublicModel.isArchiveUser()) //档案馆用户看自己的
            {
                sqlWhere = " AND AREA_CODE LIKE '" + Common.Session.GetSession("OLD_AREA_CODE") + "%'";
            }

            if (!String.IsNullOrEmpty(gcmc.Text))
            {
                sqlWhere += " AND gcmc like '%" + gcmc.Text + "%'";
            }
            if (!String.IsNullOrEmpty(gcbm.Text))
            {
                sqlWhere += " AND gcbm like '%" + gcbm.Text + "%'";
            }

            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"]);
            }

            bool isChargeUser = false;

            if ((SystemSet._DEFAULT_RECV_WORKFLOWID + ",").IndexOf(workFlowID + ",") > -1)
            {
                isChargeUser = true;
            }

            DataTable dt = null;

            if (PublicModel.isSuperAdmin())
            {
                dt = flowDefineBLL.GetListPaging(workFlowID, false, "", "", sqlWhere, pageSize, pageIndex, out itemCount);
            }
            else
            {
                dt = flowDefineBLL.GetListPaging(workFlowID, Common.Session.GetSessionBool("IsCompany"),
                                                 "", Common.Session.GetSession("UserID"), sqlWhere, pageSize, pageIndex, out itemCount, isChargeUser);
            }

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

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

            rpData.DataSource = dt;
            rpData.DataBind();
        }