コード例 #1
0
        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDel_Click(object sender, EventArgs e)
        {
            int index = gvProgramFileList.SelectedIndex;
            int strID = int.Parse(gvProgramFileList.DataKeys[index]["ID"].ToString());

            if (B_ProgramFileInfo.AllowDelProFile(strID))
            {
                IMessage ms = new WebFormMessage(Page, "该程序文件已在流程中,禁止删除。");
                ms.Show();
                return;
            }
            B_ProgramFileInfo enProFile = new B_ProgramFileInfo();

            enProFile.ID = strID;

            if (enProFile.Delete())
            {
                BindProgramFileList(false, 0, 0, "", "", "", "", "", "");
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProFile.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #2
0
        /// <summary>
        /// 重新发起
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvProgramFileList_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            string            id       = gvProgramFileList.DataKeys[e.RowIndex].Value.ToString();
            B_ProgramFileInfo pfEntity = new B_ProgramFileInfo();

            pfEntity.ID = int.Parse(id);
            if (pfEntity.ApplyStyle == ConstString.ProgramFile.PROGRAM_CREATE)
            {
                if (pfEntity.Files.Length > 0)
                {
                    return;
                }          //存在附件
                pfEntity.ApplyStyle   = null;
                pfEntity.ArchiveState = null;
                pfEntity.Year         = null;
                pfEntity.Edition      = null;

                if (pfEntity.Save())
                {
                    GetSearchList(true);
                    IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_RESTART_SUC);
                    ms.Show();
                }
                else
                {
                    string strErr = string.Empty;
                    if (pfEntity.ErrMsgs.Count != 0)
                    {
                        foreach (string str in pfEntity.ErrMsgs)
                        {
                            strErr += str;
                        }
                    }
                    IMessage ms = new WebFormMessage(Page, strErr.Length > 300 ? strErr.Substring(0, 300) : strErr);
                    ms.Show();
                }
            }//创建程序
            else
            {
                if (pfEntity.Delete())
                {
                    GetSearchList(true);
                    IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_RESTART_SUC);
                    ms.Show();
                }
                else
                {
                    string strErr = string.Empty;
                    if (pfEntity.ErrMsgs.Count != 0)
                    {
                        foreach (string str in pfEntity.ErrMsgs)
                        {
                            strErr += str;
                        }
                    }
                    IMessage ms = new WebFormMessage(Page, strErr.Length > 300 ? strErr.Substring(0, 300) : strErr);
                    ms.Show();
                }
            }//升版、注销程序
        }
コード例 #3
0
        /// <summary>
        /// 添加按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnAdd_Click(object sender, EventArgs e)
        {
            if (ddlProgramType.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_PROTYPESUB_IS_EMPTY);
                ms.Show();
                return;
            }
            B_ProgramTypeSub enProTypeSub = new B_ProgramTypeSub();

            enProTypeSub.Name        = txtProgramSubType.Text.ToString().Trim();
            enProTypeSub.ProTypId    = int.Parse(this.ddlProgramType.SelectedValue);
            enProTypeSub.Description = txtProgramSubTypeDesc.Text.ToString().Trim();
            enProTypeSub.CodeFrame   = txtCodeFrame.Text.ToString().Trim();

            if (enProTypeSub.Save())
            {
                BindProgramSubTypeList(true, -1, "", "", "");
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProTypeSub.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #4
0
        /// <summary>
        /// 修改选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnModify_Click(object sender, EventArgs e)
        {
            int index = gvProgramTypeList.SelectedIndex;
            int id    = int.Parse(gvProgramTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramType enProType = new B_ProgramType();

            enProType.ID          = id;
            enProType.Name        = this.txtProgramType.Text.ToString().Trim();     //程序类型
            enProType.Description = this.txtProgramTypeDesc.Text.ToString().Trim(); //程序类型描述
            enProType.Sort        = this.ddlProgramSort.SelectedItem.Text;          //程序分类

            if (enProType.Save())
            {
                //绑定程序类型列表
                BindProgramTypeList();
                //清空页面数据
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_EDIT_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProType.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #5
0
        /// <summary>
        /// 修改按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnModify_Click(object sender, EventArgs e)
        {
            if (ddlProgramType.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_PROTYPESUB_IS_EMPTY);
                ms.Show();
                return;
            }

            int index = gvProgramSubTypeList.SelectedIndex;
            int id    = int.Parse(gvProgramSubTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramTypeSub enProTypeSub = new B_ProgramTypeSub();

            enProTypeSub.ID          = id;
            enProTypeSub.Name        = txtProgramSubType.Text.ToString().Trim();
            enProTypeSub.ProTypId    = int.Parse(ddlProgramType.SelectedValue.ToString());
            enProTypeSub.CodeFrame   = txtCodeFrame.Text.ToString().Trim();
            enProTypeSub.Description = txtProgramSubTypeDesc.Text.ToString().Trim();

            if (enProTypeSub.Save())
            {
                BindProgramSubTypeList(false, -1, "", "", "");
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_EDIT_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProTypeSub.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #6
0
        /// <summary>
        /// 添加一条数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnAdd_Click(object sender, EventArgs e)
        {
            B_FinanceDeptInfo financeDeptInfo = new B_FinanceDeptInfo();
            financeDeptInfo.FinanceYear = this.ddlFinanceYear.SelectedValue;
            financeDeptInfo.DeptID = this.ddlDept.SelectedValue;
            financeDeptInfo.TripBudgetCost = this.txtTripBudget.Text.Trim();
            financeDeptInfo.TrainingBudgetCost = this.txtTrainingBudget.Text;
            financeDeptInfo.ZDBudgetCost = this.txtZDBudget.Text;
            financeDeptInfo.TripUseCost ="0";
            financeDeptInfo.TrainingUseCost = "0";
            financeDeptInfo.ZDBudgetCost = "0";
            if (financeDeptInfo.Save())
            {
                //得到所有财务费用
                BindFinanceList();
                //清空页面数据
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage im = new WebFormMessage(Page, financeDeptInfo.ErrMsgs[0].ToString());
                im.Show();
            }
        }
コード例 #7
0
        /// <summary>
        /// 修改选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnModify_Click(object sender, EventArgs e)
        {
            int index = gvFinanceFeeList.SelectedIndex;
            int id    = int.Parse(gvFinanceFeeList.DataKeys[index]["ID"].ToString());

            B_FinanceDeptInfo financeDeptInfo = new B_FinanceDeptInfo();

            financeDeptInfo.ID                 = id;
            financeDeptInfo.FinanceYear        = this.ddlFinanceYear.SelectedValue;
            financeDeptInfo.DeptID             = this.ddlDept.SelectedValue;
            financeDeptInfo.TripBudgetCost     = this.txtTripBudget.Text.Trim();
            financeDeptInfo.TrainingBudgetCost = this.txtTrainingBudget.Text;
            financeDeptInfo.ZDBudgetCost       = this.txtZDBudget.Text;
            financeDeptInfo.TripUseCost        = this.txtTripUse.Text;
            financeDeptInfo.TrainingUseCost    = this.txtTrainingUse.Text;
            financeDeptInfo.ZDUseCost          = this.txtZDUse.Text;
            if (financeDeptInfo.Save())
            {
                //得到所有财务费用
                BindFinanceList();
                //清空页面数据
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_EDIT_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, financeDeptInfo.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #8
0
        /// <summary>
        /// 添加一条数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnAdd_Click(object sender, EventArgs e)
        {
            B_FinanceDeptInfo financeDeptInfo = new B_FinanceDeptInfo();

            financeDeptInfo.FinanceYear        = this.ddlFinanceYear.SelectedValue;
            financeDeptInfo.DeptID             = this.ddlDept.SelectedValue;
            financeDeptInfo.TripBudgetCost     = this.txtTripBudget.Text.Trim();
            financeDeptInfo.TrainingBudgetCost = this.txtTrainingBudget.Text;
            financeDeptInfo.ZDBudgetCost       = this.txtZDBudget.Text;
            financeDeptInfo.TripUseCost        = "0";
            financeDeptInfo.TrainingUseCost    = "0";
            financeDeptInfo.ZDBudgetCost       = "0";
            if (financeDeptInfo.Save())
            {
                //得到所有财务费用
                BindFinanceList();
                //清空页面数据
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage im = new WebFormMessage(Page, financeDeptInfo.ErrMsgs[0].ToString());
                im.Show();
            }
        }
コード例 #9
0
        protected void imgbtnLogin_Click(object sender, ImageClickEventArgs e)
        {
            string l_strUserName = txtUserName.Text;

            //登陆
            OALogin.LoginUserInfo info = OALogin.Login(l_strUserName);

            if (info.ID == -1)
            {
                IMessage im = new WebFormMessage(Page, "没有该用户");
                im.Show();
                return;
            }

            if (info.Domain == "")
            {
                IMessage im = new WebFormMessage(Page, "OA子系统用户必须为域用户");
                im.Show();
                return;
            }

            HttpCookie cookie = new HttpCookie("NewOA");

            TimeSpan ts = new TimeSpan(365, 0, 0, 0);
            cookie.Expires = DateTime.Now.Add(ts);
            cookie.Values.Remove("LoginID");
            cookie.Values.Add("LoginID", l_strUserName);
            this.Response.AppendCookie(cookie);

            Session["LoginUserInfo"] = info;

            Response.Redirect("~/Index.aspx", true);
        }
コード例 #10
0
        /// <summary>
        /// 添加一条数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnAdd_Click(object sender, EventArgs e)
        {
            B_ProgramType enProType = new B_ProgramType();

            //程序类型
            enProType.Name = this.txtProgramType.Text.Trim();
            //程序类型描述
            enProType.Description = this.txtProgramTypeDesc.Text.Trim();
            //程序分类
            enProType.Sort = this.ddlProgramSort.SelectedItem.Text;

            if (enProType.Save())
            {
                //绑定程序类型列表
                BindProgramTypeList();
                //清空页面数据
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage im = new WebFormMessage(Page, enProType.ErrMsgs[0].ToString());
                im.Show();
            }
        }
コード例 #11
0
        protected void imgbtnLogin_Click(object sender, ImageClickEventArgs e)
        {
            string l_strUserName = txtUserName.Text;

            //登陆
            OALogin.LoginUserInfo info = OALogin.Login(l_strUserName);

            if (info.ID == -1)
            {
                IMessage im = new WebFormMessage(Page, "没有该用户");
                im.Show();
                return;
            }

            if (info.Domain == "")
            {
                IMessage im = new WebFormMessage(Page, "OA子系统用户必须为域用户");
                im.Show();
                return;
            }

            HttpCookie cookie = new HttpCookie("NewOA");

            TimeSpan ts = new TimeSpan(365, 0, 0, 0);

            cookie.Expires = DateTime.Now.Add(ts);
            cookie.Values.Remove("LoginID");
            cookie.Values.Add("LoginID", l_strUserName);
            this.Response.AppendCookie(cookie);

            Session["LoginUserInfo"] = info;


            Response.Redirect("~/Index.aspx", true);
        }
コード例 #12
0
        /// <summary>
        /// 删除选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {
            int index = this.gvFinanceFeeList.SelectedIndex;
            int id    = int.Parse(gvFinanceFeeList.DataKeys[index]["ID"].ToString());

            B_FinanceDeptInfo financeDeptInfo = new B_FinanceDeptInfo();

            financeDeptInfo.Load(id);
            financeDeptInfo.DeleteById(id.ToString());

            BindFinanceList();
            //清空页面数据
            ClearData();
            IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);

            ms.Show();
        }
コード例 #13
0
        /// <summary>
        /// 提交(创建程序)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            if (ddlDept.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_NONE);
                ms.Show();
                return;
            }
            if (string.IsNullOrEmpty(ddlDept.SelectedValue) && ddlDept.SelectedIndex == 0)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_UNSELECTED);
                ms.Show();
                return;
            }
            GridViewRow row = this.gvProgramFileList.SelectedRow;

            B_ProgramFileInfo bProFile = new B_ProgramFileInfo();

            bProFile.ID           = int.Parse(row.Cells[PF_ID].Text.ToString());//ID
            bProFile.Name         = txtName.Text.ToString().Trim();
            bProFile.Edition      = lblEdition.Text.ToString().Trim();
            bProFile.Code         = txtCode.Text.ToString().Trim();
            bProFile.Sort         = row.Cells[SORT].Text.ToString().Trim();
            bProFile.ProTypId     = int.Parse(row.Cells[TYPE_ID].Text.ToString().Trim());
            bProFile.ProTypSubId  = int.Parse(row.Cells[SUBTYPE_ID].Text.ToString().Trim());
            bProFile.ArchiveState = ConstString.ProgramFile.PROGRAM_UNFINISHED;//据ArchiveState is null判断需要发起的程序文件
            B_DocumentNo_A docNo_A = new B_DocumentNo_A();

            bProFile.SerialID   = docNo_A.GetNo(ProcessConstString.TemplateName.PROGRAM_FILE);//3位流水号
            bProFile.Year       = DateTime.Now.Year.ToString();
            bProFile.ApplyStyle = ConstString.ProgramFile.PROGRAM_CREATE;

            if (bProFile.Save())
            {
                RedirectUrl(bProFile.ID.ToString(), bProFile.Name, bProFile.Code, bProFile.Edition, bProFile.ApplyStyle,
                            this.hfSort.Value, ddlDept.SelectedValue, bProFile.SerialID);
            }
            else
            {
                IMessage im = new WebFormMessage(Page, "提交失败。");
                im.Show();
            }
        }
コード例 #14
0
        /// <summary>
        /// 减少按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnRemove_Click(object sender, EventArgs e)
        {
            if (Count == 0)
            {
                return;
            }
            int   index     = Count - 1;
            Label lblTongYi = PlaceHolder1.Controls[index].FindControl("lblTongYi") as Label;

            if (string.IsNullOrEmpty(lblTongYi.Text))
            {
                Count--;
                RemoveControl(Count);
                CheckSignBtn();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, "该部门存在会签记录,不可删除。");
                ms.Show();
            }
        }
コード例 #15
0
        /// <summary>
        /// 新增按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (FormsMethod.CheckRole(ConstString.RoleName.QUALITY_MEMBER) == false)
            {
                IMessage ms = new WebFormMessage(Page, "只有质保人员" + OAUser.GetUserByRoleName(ConstString.RoleName.QUALITY_MEMBER)[1].ToString() + "可以添加程序文件。");
                ms.Show();
                return;
            }
            if (txtName.Text.ToString().Contains("#") || txtName.Text.ToString().Contains("'"))
            {
                IMessage ms = new WebFormMessage(Page, "含有特殊字符,请替换后再上传");
                ms.Show();
                return;
            }
            B_ProgramFileInfo enProFile = new B_ProgramFileInfo();

            enProFile.Name = txtName.Text.ToString().Trim();
            //bProFile.Edition = "1";//txtEdition.Text.ToString().Trim();
            enProFile.Code        = txtCode.Text.ToString().Trim();
            enProFile.Sort        = ddlSort.SelectedItem.Text.ToString().Trim();
            enProFile.ProTypId    = int.Parse(ddlProgramType.SelectedItem.Value.ToString().Trim());
            enProFile.ProTypSubId = int.Parse(ddlProgramSubType.SelectedItem.Value.ToString().Trim());

            enProFile.ActivationDate = DateTime.Now;

            if (enProFile.Save())
            {
                BindProgramFileList(false, 0, 0, "", "", "", "", "", "");
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProFile.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #16
0
        /// <summary>
        /// 减少按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnRemove_Click(object sender, EventArgs e)
        {
            Int32 l_intCount = pnlCountSignList.Controls.Count;

            for (int i = l_intCount - 1; i >= 0; i--)
            {
                if (!(pnlCountSignList.Controls[i].FindControl("cb") as CheckBox).Checked)
                {
                    continue;
                }
                Label l_lblHandleResult = pnlCountSignList.Controls[i].FindControl("lblTongYi") as Label;
                if (String.IsNullOrEmpty(l_lblHandleResult.Text))
                {
                    RemoveControl(i);
                }
                else
                {
                    IMessage ms = new WebFormMessage(Page, "该部门存在会签记录,不可删除。");
                    ms.Show();
                }
            }
            Count = pnlCountSignList.Controls.Count;
        }
コード例 #17
0
        /// <summary>
        /// 删除按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {
            int index = gvProgramSubTypeList.SelectedIndex;
            int id    = int.Parse(gvProgramSubTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramTypeSub enProTypeSub = new B_ProgramTypeSub();

            enProTypeSub.ID = id;

            if (enProTypeSub.Delete())
            {
                BindProgramSubTypeList(true, -1, "", "", "");
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProTypeSub.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #18
0
        /// <summary>
        /// 归还任务
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbnRestore_Click(object sender, EventArgs e)
        {
            try
            {
                String       l_strWorkItemID   = (sender as LinkButton).CommandName;
                String       l_strTemplateName = (sender as LinkButton).CommandArgument;
                AgilePointWF ag = new AgilePointWF();

                WorkflowService l_objWorkFlowService = ag.GetAPI();

                FSWFManualWorkItem l_objManaulWorkItem = ag.GetWorkItem(l_strWorkItemID);
                if (l_objManaulWorkItem.Status == ProcessConstString.StepStatus.STATUS_ASSIGNED && String.Compare(CurrentUserInfo.UserName, l_objManaulWorkItem.UserID, true) == 0)
                {
                    l_objWorkFlowService.UndoAssignWorkItem(l_strWorkItemID);
                    System.Threading.Thread.Sleep(500);

                    String l_strTableName = TableName.GetWorkItemsTableName(l_strTemplateName);
                    String sql            = String.Format(";UPDATE {0} SET D_StepStatus='{1}' WHERE CommonID ='{2}'", l_strTableName, ProcessConstString.StepStatus.STATUS_NEW, l_objManaulWorkItem.PoolID);
                    int    ret            = FounderSoftware.Framework.Business.Entity.RunNoQuery(sql);
                    if (ret > 0)
                    {
                        LoadTaskList();
                    }
                }
                else
                {
                    IMessage im = new WebFormMessage(Page, String.Format("这个任务已经被'{0}'接收了。", l_objManaulWorkItem.UserID));
                    im.Show();
                    LoadTaskList();
                }
            }
            catch (Exception ex)
            {
                IMessage im = new WebFormMessage(Page, ex.ToString());
                im.Show();
            }
        }
コード例 #19
0
        /// <summary>
        /// 删除选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {
            int index = this.gvProgramTypeList.SelectedIndex;
            int id    = int.Parse(gvProgramTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramType enProType = new B_ProgramType();

            enProType.ID = id;

            if (enProType.Delete())
            {
                //绑定程序类型列表
                BindProgramTypeList();
                //清空页面数据
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProType.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #20
0
        /// <summary>
        /// 添加一条数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnAdd_Click(object sender, EventArgs e)
        {
            B_ProgramType enProType = new B_ProgramType();

            //程序类型
            enProType.Name = this.txtProgramType.Text.Trim();
            //程序类型描述
            enProType.Description = this.txtProgramTypeDesc.Text.Trim();
            //程序分类
            enProType.Sort = this.ddlProgramSort.SelectedItem.Text;

            if (enProType.Save())
            {
                //绑定程序类型列表
                BindProgramTypeList();
                //清空页面数据
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage im = new WebFormMessage(Page, enProType.ErrMsgs[0].ToString());
                im.Show();
            }
        }
コード例 #21
0
        /// <summary>
        /// 升版程序提交按钮事件(升版、注销)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnConfirms_Click(object sender, EventArgs e)
        {
            if (ddlDept2.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_NONE);
                ms.Show();
                return;
            }
            if (string.IsNullOrEmpty(ddlDept2.SelectedValue) && ddlDept2.SelectedIndex == 0)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_UNSELECTED);
                ms.Show();
                return;
            }
            bool isUsed = false;
            bool isRelUsed = false;
            if (rdolstStyle.SelectedIndex == 0)
            {
                isUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, lblEditions.Text, ConstString.ProgramFile.PROGRAM_UPDATE);
                int iEdition = int.Parse(lblEdition.Text) - 1;
                isRelUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, iEdition.ToString(), ConstString.ProgramFile.PROGRAM_DELETE);
            }//升版
            else
            {
                isUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, lblEditions.Text, ConstString.ProgramFile.PROGRAM_DELETE);
                int iEdition = int.Parse(lblEdition.Text) + 1;
                isRelUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, iEdition.ToString(), ConstString.ProgramFile.PROGRAM_UPDATE);
            }//注销
            if (isUsed)
            {
                IMessage ms = new WebFormMessage(Page, txtNames.Text + "第" + lblEditions.Text + "版,已在流程流转中。");
                ms.Show();
                return;
            }//所选程序文件已占用
            if (isRelUsed)
            {
                string strPrompt = string.Empty;
                strPrompt = rdolstStyle.SelectedIndex == 0 ? "正在注销流转中,不能升版。" : "正在升版流转中,不能注销。";
                IMessage ms = new WebFormMessage(Page, txtNames.Text + strPrompt);
                ms.Show();
                return;
            }

            GridViewRow row = this.gvProgramFilesList.SelectedRow;

            B_ProgramFileInfo bProFile = new B_ProgramFileInfo();
            bProFile.Name = txtNames.Text.ToString().Trim();
            bProFile.Edition = lblEditions.Text.ToString().Trim();
            bProFile.Code = txtCodes.Text.ToString().Trim();
            bProFile.Sort = row.Cells[SORTS].Text.ToString().Trim();
            bProFile.ProTypId = int.Parse(row.Cells[TYPES_ID].Text.ToString().Trim());
            bProFile.ProTypSubId = int.Parse(row.Cells[SUBTYPES_ID].Text.ToString().Trim());
            bProFile.ArchiveState = ConstString.ProgramFile.PROGRAM_UNFINISHED;//未完成
            B_DocumentNo_A docNo_A = new B_DocumentNo_A();
            bProFile.SerialID = docNo_A.GetNo(ProcessConstString.TemplateName.PROGRAM_FILE);//3位流水号
            bProFile.Year = DateTime.Now.Year.ToString();
            bProFile.ApplyStyle = rdolstStyle.SelectedIndex == 0 ? ConstString.ProgramFile.PROGRAM_UPDATE : ConstString.ProgramFile.PROGRAM_DELETE;
            string deptID = ddlDept2.SelectedValue;
            //string serialID = txtSerialID2.Text.Trim();

            //if (rdolstStyle.SelectedIndex == 0)
            //{
            if (bProFile.Save())
            {
                RedirectUrl(bProFile.ID.ToString(), bProFile.Name, bProFile.Code, bProFile.Edition, bProFile.ApplyStyle,
                    this.hfSorts.Value, ddlDept2.SelectedValue, bProFile.SerialID);
            }
            else
            {
                IMessage im = new WebFormMessage(Page, "提交失败。");
                im.Show();
            }
            //}//升版
            //else
            //{
            //    RedirectUrl(bProFile.ID.ToString(), bProFile.Name, bProFile.Code, bProFile.Edition, bProFile.ApplyStyle, deptID);
            //}//注销
        }
コード例 #22
0
        /// <summary>
        /// 提交(创建程序)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            if (ddlDept.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_NONE);
                ms.Show();
                return;
            }
            if (string.IsNullOrEmpty(ddlDept.SelectedValue) && ddlDept.SelectedIndex == 0)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_UNSELECTED);
                ms.Show();
                return;
            }
            GridViewRow row = this.gvProgramFileList.SelectedRow;

            B_ProgramFileInfo bProFile = new B_ProgramFileInfo();
            bProFile.ID = int.Parse(row.Cells[PF_ID].Text.ToString());//ID
            bProFile.Name = txtName.Text.ToString().Trim();
            bProFile.Edition = lblEdition.Text.ToString().Trim();
            bProFile.Code = txtCode.Text.ToString().Trim();
            bProFile.Sort = row.Cells[SORT].Text.ToString().Trim();
            bProFile.ProTypId = int.Parse(row.Cells[TYPE_ID].Text.ToString().Trim());
            bProFile.ProTypSubId = int.Parse(row.Cells[SUBTYPE_ID].Text.ToString().Trim());
            bProFile.ArchiveState = ConstString.ProgramFile.PROGRAM_UNFINISHED;//据ArchiveState is null判断需要发起的程序文件
            B_DocumentNo_A docNo_A = new B_DocumentNo_A();
            bProFile.SerialID = docNo_A.GetNo(ProcessConstString.TemplateName.PROGRAM_FILE);//3位流水号
            bProFile.Year = DateTime.Now.Year.ToString();
            bProFile.ApplyStyle = ConstString.ProgramFile.PROGRAM_CREATE;

            if (bProFile.Save())
            {
                RedirectUrl(bProFile.ID.ToString(), bProFile.Name, bProFile.Code, bProFile.Edition, bProFile.ApplyStyle,
                    this.hfSort.Value, ddlDept.SelectedValue, bProFile.SerialID);
            }
            else
            {
                IMessage im = new WebFormMessage(Page, "提交失败。");
                im.Show();
            }
        }
コード例 #23
0
        /// <summary>
        /// gridview更新事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvTaskList_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GetCheckItemID();

            GridViewRow row              = this.gvTaskList.Rows[e.RowIndex];
            FSLabel     lblPID           = (FSLabel)row.FindControl("lblPID");
            FSLabel     lblWID           = (FSLabel)row.FindControl("lblWID");
            FSLabel     lblReceiveUserID = (FSLabel)row.FindControl("lblUserID");
            FSLabel     lblPoolID        = (FSLabel)row.FindControl("lblPoolID");
            FSLabel     lblTemplateName  = (FSLabel)row.FindControl("lblTemplateName");
            FSLabel     lblStepName      = (FSLabel)row.FindControl("lblStepName");

            bool isSucc = false;

            switch (lblTemplateName.Text)
            {
            case ProcessConstString.TemplateName.PROGRAM_FILE:     //程序文件
                isSucc = CopyProgramFileInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.COMPANY_SEND:    //公司发文
                isSucc = CopyCompanySendInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.COMPANY_RECEIVE:    //公司收文
                isSucc = CopyCompanyReceiveInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.INSTUCTION_REPORT:    //请示报告
                isSucc = CopyRRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.AFFILIATION:    //工作联系单
                isSucc = CopyWRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.LETTER_RECEIVE:    //函件收文
                isSucc = CopyLRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.LETTER_SEND:    //函件发文
                isSucc = CopyLSInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.LETTER_RECEIVE_OLD:    //函件收文
                isSucc = CopyLRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.LETTER_SEND_OLD:    //函件发文
                isSucc = CopyLSInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.DJGT_Send:    //党纪工团发文
                isSucc = CopyDJGTInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            case ProcessConstString.TemplateName.MERGED_RECEIVE:    //党纪工团收文
                isSucc = CopyDJGTSInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                break;

            default:
                break;
            }
            if (isSucc)
            {
                txtID.Text = String.Empty;
                LoadTaskList();
                IMessage ms = new WebFormMessage(Page, "复制成功。");
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, "复制失败。");
                ms.Show();
            }
        }
コード例 #24
0
        /// <summary>
        /// 获取任务
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbnRetrieve_Click(object sender, EventArgs e)
        {
            try
            {
                String l_strWorkItemID   = (sender as LinkButton).CommandName;
                String l_strTemplateName = (sender as LinkButton).CommandArgument;

                AgilePointWF ag = new AgilePointWF();

                WorkflowService l_objWorkFlowService = ag.GetAPI();

                FSWFManualWorkItem l_objManaulWorkItem = ag.GetWorkItem(l_strWorkItemID);

                if (l_objManaulWorkItem.Status == ProcessConstString.StepStatus.STATUS_NEW)
                {
                    l_objWorkFlowService.AssignWorkItem(l_strWorkItemID);
                    System.Threading.Thread.Sleep(500);

                    String    sqlAP                 = String.Format("SELECT WORK_ITEM_ID FROM WF_MANUAL_WORKITEMS WHERE POOL_ID='{0}'", l_objManaulWorkItem.PoolID);
                    DataTable l_dtbDataTable        = SQLHelper.GetDataTable2(sqlAP);
                    String    l_strOthersWorkItemID = String.Empty;
                    String    l_strOwnWorkItemID    = String.Empty;
                    for (int i = 0; i < l_dtbDataTable.Rows.Count; i++)
                    {
                        if (i != 0)
                        {
                            l_strOthersWorkItemID += ",";
                        }
                        l_strOthersWorkItemID += "'" + l_dtbDataTable.Rows[i]["WORK_ITEM_ID"].ToString() + "'";

                        if (l_objManaulWorkItem.WorkItemID != l_dtbDataTable.Rows[i]["WORK_ITEM_ID"].ToString())
                        {
                            if (l_strOwnWorkItemID != "")
                            {
                                l_strOwnWorkItemID += ",";
                            }
                            l_strOwnWorkItemID += "'" + l_dtbDataTable.Rows[i]["WORK_ITEM_ID"].ToString() + "'";
                        }
                    }

                    //获得表名
                    String l_strTableName = TableName.GetWorkItemsTableName(l_strTemplateName);

                    String l_strExpression = String.Format("UPDATE {0} SET Is_Common=1 WHERE WorkItemID IN ({2})", l_strTableName, l_objManaulWorkItem.PoolID, l_strOthersWorkItemID);

                    if (l_strOwnWorkItemID != "")
                    {
                        l_strExpression += String.Format(";UPDATE {0} SET D_StepStatus='{1}' WHERE WorkItemID in ({2})", l_strTableName, ProcessConstString.StepStatus.STATUS_REMOVED, l_strOwnWorkItemID);
                    }
                    l_strExpression += String.Format(";UPDATE {0} SET D_StepStatus='{1}' WHERE WorkItemID ='{2}'", l_strTableName, ProcessConstString.StepStatus.STATUS_ASSIGNED, l_objManaulWorkItem.WorkItemID);

                    int ret = FounderSoftware.Framework.Business.Entity.RunNoQuery(l_strExpression);
                    if (ret > 0)
                    {
                        LoadTaskList();
                    }
                }
                else
                {
                    IMessage im = new WebFormMessage(Page, String.Format("这个任务已经被'{0}'接收了。", l_objManaulWorkItem.UserID));
                    im.Show();

                    LoadTaskList();
                }
            }
            catch (Exception ex)
            {
                IMessage im = new WebFormMessage(Page, ex.ToString());
                im.Show();
            }
        }
コード例 #25
0
        /// <summary>
        /// 修改选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnModify_Click(object sender, EventArgs e)
        {
            int index = gvProgramTypeList.SelectedIndex;
            int id = int.Parse(gvProgramTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramType enProType = new B_ProgramType();

            enProType.ID = id;
            enProType.Name = this.txtProgramType.Text.ToString().Trim();//程序类型
            enProType.Description = this.txtProgramTypeDesc.Text.ToString().Trim();//程序类型描述
            enProType.Sort = this.ddlProgramSort.SelectedItem.Text;//程序分类

            if (enProType.Save())
            {
                //绑定程序类型列表
                BindProgramTypeList();
                //清空页面数据
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_EDIT_SUC);
                ms.Show();

            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProType.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #26
0
        /// <summary>
        /// 修改按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnModify_Click(object sender, EventArgs e)
        {
            if (ddlProgramType.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_PROTYPESUB_IS_EMPTY);
                ms.Show();
                return;
            }

            int index = gvProgramSubTypeList.SelectedIndex;
            int id = int.Parse(gvProgramSubTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramTypeSub enProTypeSub = new B_ProgramTypeSub();

            enProTypeSub.ID = id;
            enProTypeSub.Name = txtProgramSubType.Text.ToString().Trim();
            enProTypeSub.ProTypId = int.Parse(ddlProgramType.SelectedValue.ToString());
            enProTypeSub.CodeFrame = txtCodeFrame.Text.ToString().Trim();
            enProTypeSub.Description = txtProgramSubTypeDesc.Text.ToString().Trim();

            if (enProTypeSub.Save())
            {
                BindProgramSubTypeList(false, -1, "", "", "");
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_EDIT_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProTypeSub.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #27
0
        /// <summary>
        /// 删除选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {
            int index = this.gvFinanceFeeList.SelectedIndex;
            int id = int.Parse(gvFinanceFeeList.DataKeys[index]["ID"].ToString());

            B_FinanceDeptInfo financeDeptInfo = new B_FinanceDeptInfo();
            financeDeptInfo.Load(id);
            financeDeptInfo.DeleteById(id.ToString());

            BindFinanceList();
            //清空页面数据
            ClearData();
            IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
            ms.Show();
        }
コード例 #28
0
        /// <summary>
        /// 新增按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (FormsMethod.CheckRole(ConstString.RoleName.QUALITY_MEMBER) == false)
            {
                IMessage ms = new WebFormMessage(Page, "只有质保人员" + OAUser.GetUserByRoleName(ConstString.RoleName.QUALITY_MEMBER)[1].ToString() + "可以添加程序文件。");
                ms.Show();
                return;
            }
            if (txtName.Text.ToString().Contains("#") || txtName.Text.ToString().Contains("'"))
            {
                IMessage ms = new WebFormMessage(Page, "含有特殊字符,请替换后再上传");
                ms.Show();
                return;
            }
            B_ProgramFileInfo enProFile = new B_ProgramFileInfo();
            enProFile.Name = txtName.Text.ToString().Trim();
            //bProFile.Edition = "1";//txtEdition.Text.ToString().Trim();
            enProFile.Code = txtCode.Text.ToString().Trim();
            enProFile.Sort = ddlSort.SelectedItem.Text.ToString().Trim();
            enProFile.ProTypId = int.Parse(ddlProgramType.SelectedItem.Value.ToString().Trim());
            enProFile.ProTypSubId = int.Parse(ddlProgramSubType.SelectedItem.Value.ToString().Trim());

            enProFile.ActivationDate = DateTime.Now;

            if (enProFile.Save())
            {
                BindProgramFileList(false, 0, 0, "", "", "", "", "", "");
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProFile.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #29
0
        /// <summary>
        /// 重新发起
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvProgramFileList_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            string id = gvProgramFileList.DataKeys[e.RowIndex].Value.ToString();
            B_ProgramFileInfo pfEntity = new B_ProgramFileInfo();
            pfEntity.ID = int.Parse(id);
            if (pfEntity.ApplyStyle == ConstString.ProgramFile.PROGRAM_CREATE)
            {
                if (pfEntity.Files.Length > 0)
                { return; }//存在附件
                pfEntity.ApplyStyle = null;
                pfEntity.ArchiveState = null;
                pfEntity.Year = null;
                pfEntity.Edition = null;

                if (pfEntity.Save())
                {
                    GetSearchList(true);
                    IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_RESTART_SUC);
                    ms.Show();
                }
                else
                {
                    string strErr = string.Empty;
                    if (pfEntity.ErrMsgs.Count != 0)
                    {
                        foreach (string str in pfEntity.ErrMsgs)
                        {
                            strErr += str;
                        }
                    }
                    IMessage ms = new WebFormMessage(Page, strErr.Length > 300 ? strErr.Substring(0, 300) : strErr);
                    ms.Show();
                }
            }//创建程序
            else
            {
                if (pfEntity.Delete())
                {
                    GetSearchList(true);
                    IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_RESTART_SUC);
                    ms.Show();
                }
                else
                {
                    string strErr = string.Empty;
                    if (pfEntity.ErrMsgs.Count != 0)
                    {
                        foreach (string str in pfEntity.ErrMsgs)
                        {
                            strErr += str;
                        }
                    }
                    IMessage ms = new WebFormMessage(Page, strErr.Length > 300 ? strErr.Substring(0, 300) : strErr);
                    ms.Show();
                }
            }//升版、注销程序
        }
コード例 #30
0
        /// <summary>
        /// 撤销流程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvProgramFileList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            string strID = gvProgramFileList.DataKeys[e.RowIndex].Value.ToString();
            bool bFlag = false;
            foreach (string strRole in CurrentUserInfo.RoleName)
            {
                if (strRole == "OA系统管理员" || strRole == "OU系统管理员" || strRole.Contains("管理员") || strRole == ConstString.RoleName.QUALITY_MEMBER)
                {
                    bFlag = true;
                }
            }
            if (!bFlag)
            {
                IMessage ms = new WebFormMessage(Page, "只有\'OA系统管理员\'、\'OU系统管理员\'、\'管理员\'、\'质保人员\'可以撤销流程。");
                ms.Show();
                return;
            }
            try
            {
                B_ProgramFileInfo pfEntity = new B_ProgramFileInfo();
                pfEntity.ID = int.Parse(strID);
                string strProcessID = pfEntity.ProcessID;
                //if (pfEntity.ApplyStyle == ConstString.ProgramFile.PROGRAM_CREATE)
                //{
                //    pfEntity.ProcessID = null;
                //    pfEntity.Year = null;
                //    //pfEntity.ApplyStyle = null;
                //    //pfEntity.ArchiveState = null;
                //    //pfEntity.Edition = null;

                //    if (pfEntity.Save() == false)
                //    {
                //        IMessage ms = new WebFormMessage(Page, pfEntity.ErrMsgs[0].ToString());
                //        ms.Show();
                //        return;
                //    }

                //}//创建
                //else
                //{
                //    if (pfEntity.Delete() == false)
                //    {
                //        IMessage ms = new WebFormMessage(Page, pfEntity.ErrMsgs[0].ToString());
                //        ms.Show();
                //        return;
                //    }

                //}//升版、注销

                if (pfEntity.Delete() == false)
                {
                    IMessage ms = new WebFormMessage(Page, pfEntity.ErrMsgs[0].ToString());
                    ms.Show();
                    return;
                }
                GetSearchList(true);
                //取消流程
                AgilePointWF ag = new AgilePointWF();
                WorkflowService api = ag.GetAPI();
                api.CancelProcInst(strProcessID);
                IMessage msg = new WebFormMessage(Page, "撤销成功。");
                msg.Show();
            }
            catch (Exception ex)
            {
                IMessage ms = new WebFormMessage(Page, ex.Message.Length > 300 ? ex.Message.Substring(0, 300) : ex.Message);
                ms.Show();
            }
        }
コード例 #31
0
        /// <summary>
        /// 删除选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {
            int index = this.gvProgramTypeList.SelectedIndex;
            int id = int.Parse(gvProgramTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramType enProType = new B_ProgramType();

            enProType.ID = id;

            if (enProType.Delete())
            {
                //绑定程序类型列表
                BindProgramTypeList();
                //清空页面数据
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProType.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #32
0
        /// <summary>
        /// 上传附件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            try
            {
                if (String.IsNullOrEmpty(UCProcessType))
                {
                    JScript.ShowMsgBox(Page, MsgType.VbExclamation, "文档库设置不能为空!");
                    return;
                }
                if (multiFile.Files.Length <= 0)
                {
                    return;
                }

                foreach (UploadedFile file in multiFile.Files)
                {
                    if (file.FileName.Contains("#") || file.FileName.Contains("'"))
                    {
                        JScript.ShowMsgBox(Page, MsgType.VbExclamation, file.FileName + "含有特殊字符,请替换后再上传");
                        JScript.ResponseScript(this, "javascript:__doPostBack('LinkButton1','')");
                        return;
                    }
                }
                foreach (UploadedFile file in multiFile.Files)
                {
                    if (file.ContentLength <= MossObject.maxFileSize * 1024 * 1024)
                    {
                        MossObject attach = new MossObject();
                        attach.ServerWeb= OAConfig.GetConfig("MOSS认证", "ServerWeb");
                        attach.OldFileName = file.FileName;
                        attach.DocumentName = UCProcessType;
                        #region 更新栏位
                        List<DictionaryEntry> lst = new List<DictionaryEntry>();
                        DictionaryEntry de = new DictionaryEntry();
                        de.Key = "流程实例";
                        de.Value = UCProcessID;
                        lst.Add(de);

                        de = new DictionaryEntry();
                        de.Key = "别名";
                        de.Value = file.FileName;
                        lst.Add(de);

                        de = new DictionaryEntry();
                        de.Key = "上次修改者";
                        de.Value = CurrentUserInfo.DisplayName;
                        lst.Add(de);
                        #endregion
                        DictionaryEntry[] result = attach.ConvertToDE(lst.ToArray());
                        attach.DocumentEntry = result;
                        //文件扩展名
                        string fileType = System.IO.Path.GetExtension(file.FileName);
                        if (fileType.IndexOf('.') == 0)
                        {
                            fileType = fileType.Substring(1);
                        }
                        bool IsSuccess = false;
                        if ("exe,dll".Contains(fileType.ToLower()))
                        {
                            IMessage im = new WebFormMessage(Page, "不可上传exe或dll文件!");
                            im.Show();

                            IsSuccess = false;
                        }
                        else
                        {
                            attach.UploadFilesStream = file.InputStream;
                            //上传附件并更新栏位
                            IsSuccess = attach.Upload();
                        }
                        if (IsSuccess)
                        {
                            CFuJian ff = new CFuJian();
                            ff.Type = System.IO.Path.GetExtension(attach.FileName);

                            if (ff.Type.IndexOf('.') == 0)
                            {
                                ff.Type = ff.Type.Substring(1);

                            }
                            ff.Title = attach.FileName;
                            ff.Alias = System.IO.Path.GetFileNameWithoutExtension(attach.OldFileName);
                            ff.FolderName = attach.FolderName;
                            ff.FileName = attach.FileName;

                            ff.Size = attach.ToFileSize_new(file.ContentLength); //文件大小
                            ff.ProcessType = UCProcessType;
                            ff.WorkItemID = UCWorkItemID;

                            ff.fullURL = attach.UploadFullName; //全路径
                            ff.URL = attach.UploadURL;//文件夹+/文件名
                            UCDataList.Add(ff);
                        }
                        //CFuJian l_objAttachment = MossObject.Upload(file, UCProcessType, UCProcessID, UCWorkItemID);
                        //UCDataList.Add(l_objAttachment);
                    }
                    else
                    {
                        JScript.ShowMsgBox(Page, MsgType.VbExclamation, file.FileName + "大小超过" + MossObject.maxFileSize + "M");
                    }
                }

                RepeaterFiles.DataSource = UCDataList;
                RepeaterFiles.DataBind();
                RunScript();
            }
            catch (Exception ex)
            {
                JScript.ShowMsgBox(Page, MsgType.VbExclamation, ex.Message);
            }
        }
コード例 #33
0
        /// <summary>
        /// 升版程序提交按钮事件(升版、注销)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnConfirms_Click(object sender, EventArgs e)
        {
            if (ddlDept2.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_NONE);
                ms.Show();
                return;
            }
            if (string.IsNullOrEmpty(ddlDept2.SelectedValue) && ddlDept2.SelectedIndex == 0)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_HOST_UNSELECTED);
                ms.Show();
                return;
            }
            bool isUsed    = false;
            bool isRelUsed = false;

            if (rdolstStyle.SelectedIndex == 0)
            {
                isUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, lblEditions.Text, ConstString.ProgramFile.PROGRAM_UPDATE);
                int iEdition = int.Parse(lblEdition.Text) - 1;
                isRelUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, iEdition.ToString(), ConstString.ProgramFile.PROGRAM_DELETE);
            }//升版
            else
            {
                isUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, lblEditions.Text, ConstString.ProgramFile.PROGRAM_DELETE);
                int iEdition = int.Parse(lblEdition.Text) + 1;
                isRelUsed = B_ProgramFileInfo.IsFileUse(txtNames.Text, iEdition.ToString(), ConstString.ProgramFile.PROGRAM_UPDATE);
            }//注销
            if (isUsed)
            {
                IMessage ms = new WebFormMessage(Page, txtNames.Text + "第" + lblEditions.Text + "版,已在流程流转中。");
                ms.Show();
                return;
            }//所选程序文件已占用
            if (isRelUsed)
            {
                string strPrompt = string.Empty;
                strPrompt = rdolstStyle.SelectedIndex == 0 ? "正在注销流转中,不能升版。" : "正在升版流转中,不能注销。";
                IMessage ms = new WebFormMessage(Page, txtNames.Text + strPrompt);
                ms.Show();
                return;
            }

            GridViewRow row = this.gvProgramFilesList.SelectedRow;

            B_ProgramFileInfo bProFile = new B_ProgramFileInfo();

            bProFile.Name         = txtNames.Text.ToString().Trim();
            bProFile.Edition      = lblEditions.Text.ToString().Trim();
            bProFile.Code         = txtCodes.Text.ToString().Trim();
            bProFile.Sort         = row.Cells[SORTS].Text.ToString().Trim();
            bProFile.ProTypId     = int.Parse(row.Cells[TYPES_ID].Text.ToString().Trim());
            bProFile.ProTypSubId  = int.Parse(row.Cells[SUBTYPES_ID].Text.ToString().Trim());
            bProFile.ArchiveState = ConstString.ProgramFile.PROGRAM_UNFINISHED;//未完成
            B_DocumentNo_A docNo_A = new B_DocumentNo_A();

            bProFile.SerialID   = docNo_A.GetNo(ProcessConstString.TemplateName.PROGRAM_FILE);//3位流水号
            bProFile.Year       = DateTime.Now.Year.ToString();
            bProFile.ApplyStyle = rdolstStyle.SelectedIndex == 0 ? ConstString.ProgramFile.PROGRAM_UPDATE : ConstString.ProgramFile.PROGRAM_DELETE;
            string deptID = ddlDept2.SelectedValue;

            //string serialID = txtSerialID2.Text.Trim();

            //if (rdolstStyle.SelectedIndex == 0)
            //{
            if (bProFile.Save())
            {
                RedirectUrl(bProFile.ID.ToString(), bProFile.Name, bProFile.Code, bProFile.Edition, bProFile.ApplyStyle,
                            this.hfSorts.Value, ddlDept2.SelectedValue, bProFile.SerialID);
            }
            else
            {
                IMessage im = new WebFormMessage(Page, "提交失败。");
                im.Show();
            }
            //}//升版
            //else
            //{
            //    RedirectUrl(bProFile.ID.ToString(), bProFile.Name, bProFile.Code, bProFile.Edition, bProFile.ApplyStyle, deptID);
            //}//注销
        }
コード例 #34
0
        /// <summary>
        /// 修改选择的数据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnModify_Click(object sender, EventArgs e)
        {
            int index = gvFinanceFeeList.SelectedIndex;
            int id = int.Parse(gvFinanceFeeList.DataKeys[index]["ID"].ToString());

            B_FinanceDeptInfo financeDeptInfo = new B_FinanceDeptInfo();
            financeDeptInfo.ID = id;
            financeDeptInfo.FinanceYear = this.ddlFinanceYear.SelectedValue;
            financeDeptInfo.DeptID = this.ddlDept.SelectedValue;
            financeDeptInfo.TripBudgetCost = this.txtTripBudget.Text.Trim();
            financeDeptInfo.TrainingBudgetCost = this.txtTrainingBudget.Text;
            financeDeptInfo.ZDBudgetCost = this.txtZDBudget.Text;
            financeDeptInfo.TripUseCost = this.txtTripUse.Text;
            financeDeptInfo.TrainingUseCost = this.txtTrainingUse.Text;
            financeDeptInfo.ZDUseCost = this.txtZDUse.Text;
            if (financeDeptInfo.Save())
            {
                //得到所有财务费用
                BindFinanceList();
                //清空页面数据
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_EDIT_SUC);
                ms.Show();

            }
            else
            {
                IMessage ms = new WebFormMessage(Page, financeDeptInfo.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #35
0
        /// <summary>
        /// 删除按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnDelete_Click(object sender, EventArgs e)
        {
            int index = gvProgramSubTypeList.SelectedIndex;
            int id = int.Parse(gvProgramSubTypeList.DataKeys[index]["ID"].ToString());

            B_ProgramTypeSub enProTypeSub = new B_ProgramTypeSub();

            enProTypeSub.ID = id;

            if (enProTypeSub.Delete())
            {
                BindProgramSubTypeList(true, -1, "", "", "");
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
                ms.Show();

            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProTypeSub.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #36
0
        /// <summary>
        /// 归还任务
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbnRestore_Click(object sender, EventArgs e)
        {
            try
            {
                String l_strWorkItemID = (sender as LinkButton).CommandName;
                String l_strTemplateName = (sender as LinkButton).CommandArgument;
                AgilePointWF ag = new AgilePointWF();

                WorkflowService l_objWorkFlowService = ag.GetAPI();

                FSWFManualWorkItem l_objManaulWorkItem = ag.GetWorkItem(l_strWorkItemID);
                if (l_objManaulWorkItem.Status == ProcessConstString.StepStatus.STATUS_ASSIGNED && String.Compare(CurrentUserInfo.UserName, l_objManaulWorkItem.UserID, true) == 0)
                {
                    l_objWorkFlowService.UndoAssignWorkItem(l_strWorkItemID);
                    System.Threading.Thread.Sleep(500);

                    String l_strTableName = TableName.GetWorkItemsTableName(l_strTemplateName);
                    String sql = String.Format(";UPDATE {0} SET D_StepStatus='{1}' WHERE CommonID ='{2}'", l_strTableName, ProcessConstString.StepStatus.STATUS_NEW, l_objManaulWorkItem.PoolID);
                    int ret = FounderSoftware.Framework.Business.Entity.RunNoQuery(sql);
                    if (ret > 0)
                    {
                        LoadTaskList();
                    }
                }
                else
                {
                    IMessage im = new WebFormMessage(Page, String.Format("这个任务已经被'{0}'接收了。", l_objManaulWorkItem.UserID));
                    im.Show();
                    LoadTaskList();
                }
            }
            catch (Exception ex)
            {
                IMessage im = new WebFormMessage(Page, ex.ToString());
                im.Show();
            }
        }
コード例 #37
0
        /// <summary>
        /// 添加按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lnkbtnAdd_Click(object sender, EventArgs e)
        {
            if (ddlProgramType.SelectedIndex == -1)
            {
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_CHECK_PROTYPESUB_IS_EMPTY);
                ms.Show();
                return;
            }
            B_ProgramTypeSub enProTypeSub = new B_ProgramTypeSub();

            enProTypeSub.Name = txtProgramSubType.Text.ToString().Trim();
            enProTypeSub.ProTypId = int.Parse(this.ddlProgramType.SelectedValue);
            enProTypeSub.Description = txtProgramSubTypeDesc.Text.ToString().Trim();
            enProTypeSub.CodeFrame = txtCodeFrame.Text.ToString().Trim();

            if (enProTypeSub.Save())
            {
                BindProgramSubTypeList(true, -1, "", "", "");
                ClearData();
                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_ADD_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProTypeSub.ErrMsgs[0].ToString());
                ms.Show();
            }
        }
コード例 #38
0
        /// <summary>
        /// 获取任务
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void lbnRetrieve_Click(object sender, EventArgs e)
        {
            try
            {
                String l_strWorkItemID = (sender as LinkButton).CommandName;
                String l_strTemplateName = (sender as LinkButton).CommandArgument;

                AgilePointWF ag = new AgilePointWF();

                WorkflowService l_objWorkFlowService = ag.GetAPI();

                FSWFManualWorkItem l_objManaulWorkItem = ag.GetWorkItem(l_strWorkItemID);

                if (l_objManaulWorkItem.Status == ProcessConstString.StepStatus.STATUS_NEW)
                {
                    l_objWorkFlowService.AssignWorkItem(l_strWorkItemID);
                    System.Threading.Thread.Sleep(500);

                    String sqlAP = String.Format("SELECT WORK_ITEM_ID FROM WF_MANUAL_WORKITEMS WHERE POOL_ID='{0}'", l_objManaulWorkItem.PoolID);
                    DataTable l_dtbDataTable = SQLHelper.GetDataTable2(sqlAP);
                    String l_strOthersWorkItemID = String.Empty;
                    String l_strOwnWorkItemID = String.Empty;
                    for (int i = 0; i < l_dtbDataTable.Rows.Count; i++)
                    {
                        if (i != 0)
                        {
                            l_strOthersWorkItemID += ",";
                        }
                        l_strOthersWorkItemID += "'" + l_dtbDataTable.Rows[i]["WORK_ITEM_ID"].ToString() + "'";

                        if (l_objManaulWorkItem.WorkItemID != l_dtbDataTable.Rows[i]["WORK_ITEM_ID"].ToString())
                        {
                            if (l_strOwnWorkItemID != "")
                            {
                                l_strOwnWorkItemID += ",";
                            }
                            l_strOwnWorkItemID += "'" + l_dtbDataTable.Rows[i]["WORK_ITEM_ID"].ToString() + "'";
                        }
                    }

                    //获得表名
                    String l_strTableName = TableName.GetWorkItemsTableName(l_strTemplateName);

                    String l_strExpression = String.Format("UPDATE {0} SET Is_Common=1 WHERE WorkItemID IN ({2})", l_strTableName, l_objManaulWorkItem.PoolID, l_strOthersWorkItemID);

                    if (l_strOwnWorkItemID != "")
                    {
                        l_strExpression += String.Format(";UPDATE {0} SET D_StepStatus='{1}' WHERE WorkItemID in ({2})", l_strTableName, ProcessConstString.StepStatus.STATUS_REMOVED, l_strOwnWorkItemID);
                    }
                    l_strExpression += String.Format(";UPDATE {0} SET D_StepStatus='{1}' WHERE WorkItemID ='{2}'", l_strTableName, ProcessConstString.StepStatus.STATUS_ASSIGNED, l_objManaulWorkItem.WorkItemID);

                    int ret = FounderSoftware.Framework.Business.Entity.RunNoQuery(l_strExpression);
                    if (ret > 0)
                    {
                        LoadTaskList();
                    }
                }
                else
                {
                    IMessage im = new WebFormMessage(Page, String.Format("这个任务已经被'{0}'接收了。", l_objManaulWorkItem.UserID));
                    im.Show();

                    LoadTaskList();
                }
            }
            catch (Exception ex)
            {
                IMessage im = new WebFormMessage(Page, ex.ToString());
                im.Show();
            }
        }
コード例 #39
0
 /// <summary>
 /// 减少按钮事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnRemove_Click(object sender, EventArgs e)
 {
     if (Count == 0)
         return;
     int index = Count - 1;
     Label lblTongYi = PlaceHolder1.Controls[index].FindControl("lblTongYi") as Label;
     if (string.IsNullOrEmpty(lblTongYi.Text))
     {
         Count--;
         RemoveControl(Count);
         CheckSignBtn();
     }
     else
     {
         IMessage ms = new WebFormMessage(Page, "该部门存在会签记录,不可删除。");
         ms.Show();
     }
 }
コード例 #40
0
        /// <summary>
        /// 上传附件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnUpload_Click(object sender, EventArgs e)
        {
            try
            {
                if (String.IsNullOrEmpty(UCProcessType))
                {
                    JScript.ShowMsgBox(Page, MsgType.VbExclamation, "文档库设置不能为空!");
                    return;
                }
                if (multiFile.Files.Length <= 0)
                {
                    return;
                }

                foreach (UploadedFile file in multiFile.Files)
                {
                    if (file.FileName.Contains("#") || file.FileName.Contains("'"))
                    {
                        JScript.ShowMsgBox(Page, MsgType.VbExclamation, file.FileName + "含有特殊字符,请替换后再上传");
                        JScript.ResponseScript(this, "javascript:__doPostBack('LinkButton1','')");
                        return;
                    }
                }
                foreach (UploadedFile file in multiFile.Files)
                {
                    if (file.ContentLength <= MossObject.maxFileSize * 1024 * 1024)
                    {
                        MossObject attach = new MossObject();
                        attach.ServerWeb    = OAConfig.GetConfig("MOSS认证", "ServerWeb");
                        attach.OldFileName  = file.FileName;
                        attach.DocumentName = UCProcessType;
                        #region 更新栏位
                        List <DictionaryEntry> lst = new List <DictionaryEntry>();
                        DictionaryEntry        de  = new DictionaryEntry();
                        de.Key   = "流程实例";
                        de.Value = UCProcessID;
                        lst.Add(de);

                        de       = new DictionaryEntry();
                        de.Key   = "别名";
                        de.Value = file.FileName;
                        lst.Add(de);

                        de       = new DictionaryEntry();
                        de.Key   = "上次修改者";
                        de.Value = CurrentUserInfo.DisplayName;
                        lst.Add(de);
                        #endregion
                        DictionaryEntry[] result = attach.ConvertToDE(lst.ToArray());
                        attach.DocumentEntry = result;
                        //文件扩展名
                        string fileType = System.IO.Path.GetExtension(file.FileName);
                        if (fileType.IndexOf('.') == 0)
                        {
                            fileType = fileType.Substring(1);
                        }
                        bool IsSuccess = false;
                        if ("exe,dll".Contains(fileType.ToLower()))
                        {
                            IMessage im = new WebFormMessage(Page, "不可上传exe或dll文件!");
                            im.Show();

                            IsSuccess = false;
                        }
                        else
                        {
                            attach.UploadFilesStream = file.InputStream;
                            //上传附件并更新栏位
                            IsSuccess = attach.Upload();
                        }
                        if (IsSuccess)
                        {
                            CFuJian ff = new CFuJian();
                            ff.Type = System.IO.Path.GetExtension(attach.FileName);

                            if (ff.Type.IndexOf('.') == 0)
                            {
                                ff.Type = ff.Type.Substring(1);
                            }
                            ff.Title      = attach.FileName;
                            ff.Alias      = System.IO.Path.GetFileNameWithoutExtension(attach.OldFileName);
                            ff.FolderName = attach.FolderName;
                            ff.FileName   = attach.FileName;

                            ff.Size        = attach.ToFileSize_new(file.ContentLength); //文件大小
                            ff.ProcessType = UCProcessType;
                            ff.WorkItemID  = UCWorkItemID;

                            ff.fullURL = attach.UploadFullName; //全路径
                            ff.URL     = attach.UploadURL;      //文件夹+/文件名
                            UCDataList.Add(ff);
                        }
                        //CFuJian l_objAttachment = MossObject.Upload(file, UCProcessType, UCProcessID, UCWorkItemID);
                        //UCDataList.Add(l_objAttachment);
                    }
                    else
                    {
                        JScript.ShowMsgBox(Page, MsgType.VbExclamation, file.FileName + "大小超过" + MossObject.maxFileSize + "M");
                    }
                }

                RepeaterFiles.DataSource = UCDataList;
                RepeaterFiles.DataBind();
                RunScript();
            }
            catch (Exception ex)
            {
                JScript.ShowMsgBox(Page, MsgType.VbExclamation, ex.Message);
            }
        }
コード例 #41
0
        /// <summary>
        /// gridview更新事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvTaskList_RowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GetCheckItemID();

            GridViewRow row = this.gvTaskList.Rows[e.RowIndex];
            FSLabel lblPID = (FSLabel)row.FindControl("lblPID");
            FSLabel lblWID = (FSLabel)row.FindControl("lblWID");
            FSLabel lblReceiveUserID = (FSLabel)row.FindControl("lblUserID");
            FSLabel lblPoolID = (FSLabel)row.FindControl("lblPoolID");
            FSLabel lblTemplateName = (FSLabel)row.FindControl("lblTemplateName");
            FSLabel lblStepName = (FSLabel)row.FindControl("lblStepName");

            bool isSucc = false;
            switch (lblTemplateName.Text)
            {
                case ProcessConstString.TemplateName.PROGRAM_FILE: //程序文件
                    isSucc = CopyProgramFileInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.COMPANY_SEND://公司发文
                    isSucc = CopyCompanySendInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.COMPANY_RECEIVE://公司收文
                    isSucc = CopyCompanyReceiveInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.INSTUCTION_REPORT://请示报告
                    isSucc = CopyRRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.AFFILIATION://工作联系单
                    isSucc = CopyWRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.LETTER_RECEIVE://函件收文
                    isSucc = CopyLRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.LETTER_SEND://函件发文
                    isSucc = CopyLSInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.LETTER_RECEIVE_OLD://函件收文
                    isSucc = CopyLRInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.LETTER_SEND_OLD://函件发文
                    isSucc = CopyLSInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.DJGT_Send://党纪工团发文
                    isSucc = CopyDJGTInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                case ProcessConstString.TemplateName.MERGED_RECEIVE://党纪工团收文
                    isSucc = CopyDJGTSInfo(txtID.Text, lblStepName.Text, lblReceiveUserID.Text, lblPID.Text, lblWID.Text, lblPoolID.Text);
                    break;
                default:
                    break;
            }
            if (isSucc)
            {
                txtID.Text = String.Empty;
                LoadTaskList();
                IMessage ms = new WebFormMessage(Page, "复制成功。");
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, "复制失败。");
                ms.Show();
            }
        }
コード例 #42
0
        /// <summary>
        /// 撤销流程
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void gvProgramFileList_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            string strID = gvProgramFileList.DataKeys[e.RowIndex].Value.ToString();
            bool   bFlag = false;

            foreach (string strRole in CurrentUserInfo.RoleName)
            {
                if (strRole == "OA系统管理员" || strRole == "OU系统管理员" || strRole.Contains("管理员") || strRole == ConstString.RoleName.QUALITY_MEMBER)
                {
                    bFlag = true;
                }
            }
            if (!bFlag)
            {
                IMessage ms = new WebFormMessage(Page, "只有\'OA系统管理员\'、\'OU系统管理员\'、\'管理员\'、\'质保人员\'可以撤销流程。");
                ms.Show();
                return;
            }
            try
            {
                B_ProgramFileInfo pfEntity = new B_ProgramFileInfo();
                pfEntity.ID = int.Parse(strID);
                string strProcessID = pfEntity.ProcessID;
                //if (pfEntity.ApplyStyle == ConstString.ProgramFile.PROGRAM_CREATE)
                //{
                //    pfEntity.ProcessID = null;
                //    pfEntity.Year = null;
                //    //pfEntity.ApplyStyle = null;
                //    //pfEntity.ArchiveState = null;
                //    //pfEntity.Edition = null;

                //    if (pfEntity.Save() == false)
                //    {
                //        IMessage ms = new WebFormMessage(Page, pfEntity.ErrMsgs[0].ToString());
                //        ms.Show();
                //        return;
                //    }

                //}//创建
                //else
                //{
                //    if (pfEntity.Delete() == false)
                //    {
                //        IMessage ms = new WebFormMessage(Page, pfEntity.ErrMsgs[0].ToString());
                //        ms.Show();
                //        return;
                //    }

                //}//升版、注销

                if (pfEntity.Delete() == false)
                {
                    IMessage ms = new WebFormMessage(Page, pfEntity.ErrMsgs[0].ToString());
                    ms.Show();
                    return;
                }
                GetSearchList(true);
                //取消流程
                AgilePointWF    ag  = new AgilePointWF();
                WorkflowService api = ag.GetAPI();
                api.CancelProcInst(strProcessID);
                IMessage msg = new WebFormMessage(Page, "撤销成功。");
                msg.Show();
            }
            catch (Exception ex)
            {
                IMessage ms = new WebFormMessage(Page, ex.Message.Length > 300 ? ex.Message.Substring(0, 300) : ex.Message);
                ms.Show();
            }
        }
コード例 #43
0
        /// <summary>
        /// 减少按钮事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnRemove_Click(object sender, EventArgs e)
        {
            Int32 l_intCount = pnlCountSignList.Controls.Count;

            for (int i = l_intCount - 1; i >= 0; i--)
            {
                if (!(pnlCountSignList.Controls[i].FindControl("cb") as CheckBox).Checked)
                {
                    continue;
                }
                Label l_lblHandleResult = pnlCountSignList.Controls[i].FindControl("lblTongYi") as Label;
                if (String.IsNullOrEmpty(l_lblHandleResult.Text))
                {
                    RemoveControl(i);
                }
                else
                {
                    IMessage ms = new WebFormMessage(Page, "该部门存在会签记录,不可删除。");
                    ms.Show();
                }
            }
            Count = pnlCountSignList.Controls.Count;
        }
コード例 #44
0
        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDel_Click(object sender, EventArgs e)
        {
            int index = gvProgramFileList.SelectedIndex;
            int strID = int.Parse(gvProgramFileList.DataKeys[index]["ID"].ToString());
            if (B_ProgramFileInfo.AllowDelProFile(strID))
            {
                IMessage ms = new WebFormMessage(Page, "该程序文件已在流程中,禁止删除。");
                ms.Show();
                return;
            }
            B_ProgramFileInfo enProFile = new B_ProgramFileInfo();

            enProFile.ID = strID;

            if (enProFile.Delete())
            {
                BindProgramFileList(false, 0, 0, "", "", "", "", "", "");
                ClearData();

                IMessage ms = new WebFormMessage(Page, ConstString.PromptInfo.ACTION_DEL_SUC);
                ms.Show();
            }
            else
            {
                IMessage ms = new WebFormMessage(Page, enProFile.ErrMsgs[0].ToString());
                ms.Show();

            }
        }