/// <summary>
        /// 关闭
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnClose_Click(object sender, EventArgs e)
        {
            string strScript = String.Format("parent.ClosePopDiv('{0}')", base.divPopDivID + base.UCID);

            //组成一整条js后运行
            ClientScriptM.ResponseScript(this, strScript);
        }
        /// <summary>
        /// 在线编辑
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnEdit_Click(object sender, EventArgs e)
        {
            LinkButton btnEdit = sender as LinkButton;
            String     title   = btnEdit.CommandName;

            ClientScriptM.ResponseScript(this, String.Format("AttachmentOpen('{0}','{1}','{2}');", UCControlID, txtServicePath.ClientID, title), true);
        }
        //chen
        protected void btnMarker_Click(object sender, EventArgs e)
        {
            for (int i = 0; i <= gvTaskList.Rows.Count - 1; i++)
            {
                System.Web.UI.HtmlControls.HtmlInputCheckBox cbx = (System.Web.UI.HtmlControls.HtmlInputCheckBox)gvTaskList.Rows[i].FindControl("cbxContact");
                if (cbx.Checked)
                {
                    LinkButton l_btnMarker = (LinkButton)gvTaskList.Rows[i].FindControl("lbnQuickMarker");


                    String l_strProcessTemplate = l_btnMarker.CommandName;

                    String l_strTableName = TableName.GetCirculateTableName(l_strProcessTemplate);

                    B_Circulate l_burCirculate = new B_Circulate(l_strTableName);
                    l_burCirculate.ID = Convert.ToInt32(l_btnMarker.CommandArgument);

                    l_burCirculate.Is_Read = true;
                    try
                    {
                        l_burCirculate.MultiRead(l_strTableName, l_burCirculate.ID);
                    }
                    catch (Exception err)
                    {
                    }
                }
            }
            LoadTaskList();
            ClientScriptM.RefreshLeft(Page);
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!Page.IsPostBack)
            //{
            //    Session["附件ListTemp"] = txtUCXML.Value;

            //    if (!String.IsNullOrEmpty(base.GetQueryString("IsHistory")))
            //    {
            //        UCIsEditable = false;
            //    }

            //    UCWorkItemID = base.GetQueryString("WID");

            //    ClientScriptM.ResponseScript(Page, String.Format("OpenAttachment('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}')", txtUCXML.ClientID, PopIframeID, UCTemplateName, UCProcessID, UCIsEditable, UCWorkItemID, UCTBID, UCIsAgain));
            //}

            Session["附件ListTemp"] = txtUCXML.Value;

            if (!String.IsNullOrEmpty(base.GetQueryString("IsHistory")))
            {
                UCIsEditable = false;//true;// false;  //yangzj 20110630
            }

            UCWorkItemID = base.GetQueryString("WID");

            ClientScriptM.ResponseScript(Page, String.Format("OpenAttachment('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}')", txtUCXML.ClientID, PopIframeID, UCTemplateName, UCProcessID, UCIsEditable, UCWorkItemID, UCTBID, UCIsAgain));
        }
Пример #5
0
        /// <summary>
        /// 重定向
        /// </summary>
        /// <param name="fileID">程序文件ID</param>
        /// <param name="fileName">程序文件名称</param>
        /// <param name="code">程序编码</param>
        /// <param name="edition">版次</param>
        /// <param name="serialID">流水号</param>
        /// <param name="style">类型</param>
        private void RedirectUrl(string fileID, string fileName, string code, string edition, string style, string sort, string deptID, string num)
        {
            string url = string.Format(@"Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkFlow.ProgramFile.PG2_ProgramFile&name={0}&code={1}&edition={2}&style={3}&sort={4}&id={5}&deptID={6}&num={7}&TemplateName={8}&StepName=编制",
                                       Server.UrlEncode(fileName), Server.UrlEncode(code), Server.UrlEncode(edition), Server.UrlEncode(style),
                                       Server.UrlEncode(sort), Server.UrlEncode(fileID), Server.UrlEncode(deptID), Server.UrlEncode(num), Request.QueryString[ConstString.QueryString.TEMPLATE_NAME].ToString());

            ClientScriptM.ResponseScript(Page, "location.replace('" + SysString.UrlFilter(url) + "');", false);//renjinquan改,对url中的'转换
        }
        /// <summary>
        /// 回传值
        /// </summary>
        private void RunScript()
        {
            String script = "";

            script += base.GetJSscriptXMLValue(UCControlID, MossObject.FuJianList2Xml(UCDataList));

            //组成一整条js后运行
            ClientScriptM.ResponseScript(this, script);
        }
Пример #7
0
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            #region 页面显示控制

            //如果需要选人
            if (UCSelectType == "1" || UCSelectType == "2")
            {
                this.tvDeptList.SelectedNodeChanged += new EventHandler(tvDeptList_SelectedNodeChanged);
            }

            if (UCIsSingle || UCAllSelect)
            {
                this.lbxLeft.SelectionMode            = ListSelectionMode.Single;
                this.tvDeptList.TreeNodeCheckChanged += new TreeNodeEventHandler(tvDeptList_TreeNodeCheckChanged);
                this.tvDeptList_TreeNodeCheckChanged(null, null);
            }
            if (string.IsNullOrEmpty(this.UCTemplateName) == false && string.IsNullOrEmpty(this.UCFormName) == false)
            {
                this.tvRoleList.SelectedNodeChanged += new EventHandler(tvRoleList_SelectedNodeChanged);
            }

            #endregion

            if (!IsPostBack)
            {
                //如果只选部门
                if (UCSelectType == "0")
                {
                    //如果是单选
                    if (UCIsSingle)
                    {
                        this.tvDeptList.Attributes.Add("onclick", "javascript:onPost()");
                        //tvDeptList.Width = new Unit(450);
                    }
                    divDeptList.Style.Add("width", "400px");
                    this.PanelUser.Visible = false;
                }
                //如果需要选人
                if (UCSelectType == "1")
                {
                    this.tvDeptList.ShowCheckBoxes = TreeNodeTypes.None;

                    //如果是单选
                    if (UCIsSingle)
                    {
                        this.btnAddAll.Visible    = false;
                        this.btnDeleteAll.Visible = false;
                    }
                }
                ClientScriptM.ResponseScript(Page, "GetParent();");
                if (UCRole == String.Empty)
                {
                    this.PanelRole.Visible = false;
                }
            }
        }
Пример #8
0
 protected void btnLogOutSSO_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["UserName"] == null)
     {
         string url = System.Web.Configuration.WebConfigurationManager.AppSettings["SSOLoginURL"].ToString();
         ClientScriptM.ResponseScript(Page, string.Format("window.top.location.href='{0}';", url));
     }
     else
     {
         string url = System.Web.Configuration.WebConfigurationManager.AppSettings["SSOLoginURL"].ToString();
         ClientScriptM.ResponseScript(Page, string.Format("window.top.location.href='{0}';", url));
     }
 }
        /// <summary>
        /// 脚本回传
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOK_Click(object sender, EventArgs e)
        {
            String strIds   = String.Empty;
            String strNos   = String.Empty;
            String strNames = String.Empty;

            if (UCIsSingle)
            {
                strIds = this.gvCompany.SelectedKey;
            }
            else
            {
                strIds = SysString.GetStringFormatForList(this.gvCompany.SelectedKeys, ",");
            }
            vb = OADept.GetCompany(this.ddlType.SelectedIndex + 1, this.txtSearchText.Text.Trim());
            if (String.IsNullOrEmpty(strIds) == false)
            {
                if (vb != null)
                {
                    vb.Condition = "a.ID in (" + strIds + ")";
                    strIds       = vb.GetFieldVals("ID", ";");
                    strNos       = vb.GetFieldVals("No", ";");
                    strNames     = vb.GetFieldVals("Name", ";") + ";";
                }
            }

            String strScript = String.Empty;

            if (this.UCIDControl != String.Empty)
            {
                strScript += base.GetJSscriptValue(this.UCIDControl, strIds);
            }

            if (this.UCNoControl != String.Empty)
            {
                strScript += base.GetJSscriptValue(this.UCNoControl, strNos);
                strScript += base.GetJSscriptTitle(this.UCNoControl, strNames);
            }

            if (this.UCNameControl != String.Empty)
            {
                strScript += base.GetJSscriptValue(this.UCNameControl, strNames);
                strScript += base.GetJSscriptTitle(this.UCNameControl, strNos);
            }
            if (UCIsSingle)
            {
                strScript += String.Format("parent.ClosePopDiv('{0}')", base.divPopDivID + base.UCID);
            }
            //组成一整条js后运行
            ClientScriptM.ResponseScript(this, strScript);
        }
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ClientScriptM.ResponseScript(Page, "GetParent();");

                if (this.UCIsSingle)
                {
                    this.gvRole.Columns[0].Visible = false;
                }
                else
                {
                    this.gvRole.Columns[1].Visible = false;
                }
            }
        }
 /// <summary>
 /// 页面加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     base.IsFirstBind = false;
     if (!IsPostBack)
     {
         ClientScriptM.ResponseScript(Page, "GetParent();");
         if (this.UCIsSingle)
         {
             this.gvCompany.ShowCheckBox            = false;
             this.gvCompany.ShowRadioButton         = true;
             this.gvCompany.CheckTemplateHeaderText = "单选";
             this.btnClose.Visible = false;
         }
         else
         {
             this.gvCompany.ShowRadioButton = false;
             this.gvCompany.ShowCheckBox    = true;
         }
     }
 }
        /// <summary>
        /// 确定按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOK_Click(object sender, EventArgs e)
        {
            ArrayList arrIDS   = new ArrayList();
            ArrayList arrNameS = new ArrayList();

            foreach (ListItem item in this.fsltbRoleUser.Items)
            {
                arrIDS.Add(item.Value);
                arrNameS.Add(item.Text);
            }
            String strClientScript = String.Empty;
            String strIds          = base.GetStringText(arrIDS).Replace(@"\", @"\\"); //帐号
            String strNames        = base.GetStringText(arrNameS);                    // 姓名

            //chenye
            if (UCIsSingle)
            {
                if (UCUserIDControl != String.Empty)
                {
                    strClientScript += base.GetJSscriptXMLValue(UCUserIDControl, strIds);
                }
                if (UCUserNameControl != String.Empty)
                {
                    strClientScript += base.GetJSscriptXMLValue(UCUserNameControl, strNames);
                }
            }
            else
            {
                if (UCUserIDControl != String.Empty)
                {
                    strClientScript += base.GetJSscriptValue(UCUserIDControl, strIds);
                }
                if (UCUserNameControl != String.Empty)
                {
                    strClientScript += base.GetJSscriptValue(UCUserNameControl, strNames);
                }
            }
            strClientScript += string.Format("parent.ClosePopDiv('{0}')", base.divPopDivID + base.UCID);
            //组成一整条js后运行
            ClientScriptM.ResponseScript(this, strClientScript);
        }
        /// <summary>
        /// 快速阅知
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbnQuickMarker_Click(object sender, EventArgs e)
        {
            LinkButton l_lbnQuickMarker = sender as LinkButton;

            String l_strProcessTemplate = l_lbnQuickMarker.CommandName;

            String l_strTableName = TableName.GetCirculateTableName(l_strProcessTemplate);

            B_Circulate l_burCirculate = new B_Circulate(l_strTableName);

            l_burCirculate.ID = Convert.ToInt32(l_lbnQuickMarker.CommandArgument);

            l_burCirculate.Is_Read = true;
            bool ret = l_burCirculate.Save();

            if (ret)
            {
                LoadTaskList();
                ClientScriptM.RefreshLeft(Page);
            }
        }
Пример #14
0
        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnOK_Click(object sender, EventArgs e)
        {
            #region 获得部门ID和Name
            String deptID   = String.Empty;
            String deptName = String.Empty;

            ArrayList arrCheckedDeptID = new ArrayList();

            foreach (TreeNode node in this.tvDeptList.CheckedNodes)
            {
                arrCheckedDeptID.Add(node.Value);
            }

            if (arrCheckedDeptID.Count > 0)
            {
                foreach (object o in arrCheckedDeptID)
                {
                    if (o.ToString() != String.Empty)
                    {
                        deptID   += ";" + o.ToString();
                        deptName += ";" + OADept.GetDeptName(o.ToString());
                    }
                }
                if (deptID.Length > 0)
                {
                    deptID = deptID.Substring(1);
                }
                if (deptName.Length > 0)
                {
                    deptName = deptName.Substring(1);
                }
            }
            #endregion

            #region 获得部门成员ID和Name
            String deptUserID   = String.Empty;
            String deptUserName = String.Empty;

            ArrayList arrDeptUserName = new ArrayList();
            ArrayList arrDeptUserID   = new ArrayList();

            foreach (ListItem item in lbxRight.Items)
            {
                arrDeptUserID.Add(item.Value);
                arrDeptUserName.Add(OAUser.GetUserName(item.Value));
            }
            //帐号
            deptUserID = base.GetStringText(arrDeptUserID).Replace(@"\", @"\\");
            //姓名
            deptUserName = base.GetStringText(arrDeptUserName);

            #endregion

            #region  获得角色成员ID和Name
            String    roleUserID      = String.Empty;
            String    roleUserName    = String.Empty;
            ArrayList arrRoleUserName = new ArrayList();
            ArrayList arrRoleUserID   = new ArrayList();
            foreach (ListItem item in chkRole.Items)
            {
                if (item.Selected)
                {
                    arrRoleUserID.Add(item.Value);
                    arrRoleUserName.Add(item.Text);
                }
            }

            //帐号
            roleUserID = base.GetStringText(arrRoleUserID).Replace(@"\", @"\\");
            //姓名
            roleUserName = base.GetStringText(arrRoleUserName);

            #endregion

            #region 获得部门树上成员ID和Name

            String   deptTreeUserID   = String.Empty;
            String   deptTreeUserName = String.Empty;//用户名字
            String[] strUsers         = new String[2];

            GetType1();

            if (UCDeptTreeUserIDControl != String.Empty || UCDeptTreeUserNameControl != String.Empty)
            {
                if (this.type1 == "1" || this.type2 == "1" || this.type3 == "1")
                {
                    foreach (String deptid in arrCheckedDeptID)
                    {
                        strUsers = this.GetDeptMember(deptid);
                        if (strUsers[0] != null && strUsers[1] != null)
                        {
                            deptTreeUserID   += ";" + strUsers[0];
                            deptTreeUserName += ";" + strUsers[1];
                        }
                    }
                    if (deptTreeUserName.Length > 0)
                    {
                        deptTreeUserName = FormsMethod.FilterRepeat(deptTreeUserName.Substring(1));
                    }
                    if (deptTreeUserID.Length > 0)
                    {
                        deptTreeUserID = FormsMethod.FilterRepeat(deptTreeUserID.Substring(1)).Replace(@"\", @"\\");
                    }
                }
            }

            #endregion

            #region 获得角色组的名称

            string strGroupName = string.Empty;

            foreach (TreeNode node in this.tvRoleList.CheckedNodes)
            {
                strGroupName += ";" + node.Text;
            }
            if (strGroupName.Length > 0)
            {
                strGroupName = strGroupName.Substring(1);
            }

            #endregion

            #region 获得回传脚本
            String script = String.Empty;

            if (UCDeptIDControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCDeptIDControl, deptID);
            }
            if (UCDeptNameControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCDeptNameControl, deptName);
                script += base.GetJSscriptTitle(UCDeptNameControl, deptID);
            }
            if (UCDeptUserIDControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCDeptUserIDControl, deptUserID);
            }
            if (UCDeptUserNameControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCDeptUserNameControl, deptUserName);
                script += base.GetJSscriptTitle(UCDeptUserNameControl, deptUserID);
            }
            if (UCRoleUserIDControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCRoleUserIDControl, roleUserID);
            }
            if (UCRoleUserNameControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCRoleUserNameControl, roleUserName);
                script += base.GetJSscriptTitle(UCRoleUserNameControl, roleUserID);
            }
            if (UCDeptTreeUserIDControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCDeptTreeUserIDControl, deptTreeUserID);
            }
            if (UCDeptTreeUserNameControl != String.Empty)
            {
                script += base.GetJSscriptValue(UCDeptTreeUserNameControl, deptTreeUserName);
                script += base.GetJSscriptTitle(UCDeptTreeUserNameControl, deptTreeUserID);
            }

            //如果是部门和人员选到一个文本框上
            if (this.UCDeptAndUserControl != String.Empty)
            {
                String strDeptAndUser = String.Empty;
                if (deptName != String.Empty)
                {
                    strDeptAndUser += deptName;
                }
                if (deptUserName != String.Empty)
                {
                    if (strDeptAndUser != String.Empty)
                    {
                        strDeptAndUser += ";";
                    }
                    strDeptAndUser += deptUserName;
                }
                if (strGroupName != string.Empty)
                {
                    if (strDeptAndUser != string.Empty)
                    {
                        strDeptAndUser += ";";
                    }
                    strDeptAndUser += strGroupName;
                }
                script += base.GetJSscriptValue(UCDeptAndUserControl, strDeptAndUser);
            }

            script += String.Format("parent.ClosePopDiv('{0}')", base.divPopDivID + base.UCID);

            #endregion

            //组成一整条js后运行
            ClientScriptM.ResponseScript(this, script);
        }
Пример #15
0
 protected void btnSys_Click(object sender, EventArgs e)
 {
     ClientScriptM.ResponseScript(Page, string.Format("window.top.location.href='{0}';", (sender as LinkButton).CommandName));
 }
Пример #16
0
 protected void btnLogOutSys_Click(object sender, EventArgs e)
 {
     ClientScriptM.ResponseScript(Page, "window.top.location.href='login.aspx';");
 }