Exemple #1
0
        void ucPrint_OnExtraExport(object sender, EventArgs e)
        {
            //B_Finance cEntity = this.ControlToEntity(false) as B_Finance;
            B_Finance cEntity = null;

            if (base.IsPreview)
            {
                cEntity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance();
            }
            else
            {
                cEntity = this.ControlToEntity(false) as B_Finance;
            }
            switch (ucPrint.FileName)
            {
            case "公司报告":
                ucPrint.BatchAddPicture("请示报告", "公司报告", cEntity);
                break;

            case "公司请示":
                ucPrint.BatchAddPicture("请示报告", "公司请示", cEntity);
                break;

            case "请示报告表单":
                ucPrint.BatchAddPicture("请示报告", "请示报告表单", cEntity);
                break;
            }
        }
        private void Print_OnBeginExport(object sender, EventArgs e)
        {
            if (m_print == null || m_print.m_ls == null || m_print.m_ls.Count == 0) return;
            Print print = new Print();

            m_Entity = m_print.m_CurrEntity as B_Finance;
            print.SetPrintBeginExport(m_print, m_Entity);
        }
Exemple #3
0
        /// <summary>
        ///申请单的编号规则 CC+部门代码+年度+四位流水号
        /// </summary>
        /// <returns></returns>
        protected string GetFinanceTripNo(B_Finance entity)
        {
            Department     dept           = OADept.GetDeptByDeptID(this.ddlBianZhiBuMen.SelectedValue);
            string         strLine        = "-";
            string         strYear        = DateTime.Now.Year.ToString();
            B_DocumentNo_A b_documentno_a = new B_DocumentNo_A();

            return("CCSQ" + strLine + dept.No + strLine + b_documentno_a.GetNo(ProcessConstString.TemplateName.FINANCE_TRIPAPPLY, strYear));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //InitPrint();
            this.SubmitEvents();
            B_Finance b_Finance = new B_Finance();
            string    url       = b_Finance.GetFinanceUrl(txtChuChaDanHao.Text);

            linkShow.NavigateUrl = url;
        }
Exemple #5
0
        private void Print_OnBeginExport(object sender, EventArgs e)
        {
            if (m_print == null || m_print.m_ls == null || m_print.m_ls.Count == 0)
            {
                return;
            }
            Print print = new Print();

            m_Entity = m_print.m_CurrEntity as B_Finance;
            print.SetPrintBeginExport(m_print, m_Entity);
        }
Exemple #6
0
        private string GetFeeComparedSigner(B_Finance entity)
        {
            string SignIDs = string.Empty;

            Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtFeeFaSheng.Text) ? "0" : txtFeeFaSheng.Text);
            Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtFeeYuSuan.Text) ? "0" : txtFeeYuSuan.Text);
            Double Rate  = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate));

            if ((FeeFa - FeeYu) / FeeYu > Rate)
            {
                if (ddlZongJingLi.SelectedItem != null)
                {
                    //总经理 - 以及大于10%否(大于就总经理签)
                    entity.GeneralManager   = ddlZongJingLi.SelectedItem.Text;
                    entity.GeneralManagerID = ddlZongJingLi.SelectedValue;
                    base.SubAction          = "提交总经理";
                }
            }
            else if (FeeFa > FeeYu)
            {
                if (ddlZhuGuanLingDao.SelectedItem != null)
                {
                    //主管领导 - 已经发生的差旅费是否大于预算(大于就主管领导签)
                    entity.ChargeLeader   = ddlZhuGuanLingDao.SelectedItem.Text;
                    entity.ChargeLeaderID = ddlZhuGuanLingDao.SelectedValue;
                    base.SubAction        = "提交主管领导";
                }
            }
            else if (FeeFa <= FeeYu)
            {
                //处领导 -
                if (ddlChuLingDao.SelectedItem != null)
                {
                    entity.DepartmentLeader   = ddlChuLingDao.SelectedItem.Text;
                    entity.DepartmentLeaderID = ddlChuLingDao.SelectedValue;
                }
                base.SubAction = "提交处领导";
            }

            if (this.SubmitStatus == 2)
            {
                entity.ChargeLeader   = ddlZhuGuanLingDao.SelectedItem.Text;
                entity.ChargeLeaderID = ddlZhuGuanLingDao.SelectedValue;
                base.SubAction        = "提交主管领导";
            }
            else if (this.SubmitStatus == 1)
            {
                entity.GeneralManager   = ddlZongJingLi.SelectedItem.Text;
                entity.GeneralManagerID = ddlZongJingLi.SelectedValue;
                base.SubAction          = "提交总经理";
            }
            return(SignIDs);
        }
Exemple #7
0
        private void ucPrint_OnBeginExport(object sender, EventArgs e)
        {
            Print print = new Print();
            //B_Finance cEntity = new B_Finance();
            //GetFormData(cEntity, Submit.保存);
            B_Finance cEntity = null;

            if (base.IsPreview)
            {
                cEntity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance();
            }
            else
            {
                cEntity = this.ControlToEntity(false) as B_Finance;
            }
            print.SetPrintBeginExport(ucPrint, cEntity);
        }
        private string Devolve2DP(FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP hn_oa2dp, string sDPID)
        {
            string    sXml   = "";
            B_Finance entity = this.ControlToEntity(false) as B_Finance;

            #region ArchiveNode
            FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode();
            ar.System  = "OA_" + base.IdentityID.ToString();
            ar.FK_DPID = sDPID;

            ar.UndertakeDepartment = entity.BianZhiBuMenID;
            ar.Title               = entity.DocumentTitle;
            ar.MainDispenseUnit    = entity.MainSend;
            ar.RelatedDespenseUnit = entity.CopySend;
            ar.FormationDept       = entity.Department;
            ar.EffectTime          = entity.ConfirmDate.ToShortDateString();
            ar.Auditby             = entity.CheckDrafter;
            ar.AuditDate           = entity.CheckDate.ToShortDateString();
            ar.Author              = entity.Drafter;

            ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString();
            #endregion
            sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName);

            FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode();
            /****开始生成File节点************************************************************************/
            #region 开始生成File节点
            fl.AuthorizeTime   = ar.AuthorizeTime;
            fl.Code            = ar.Code;
            fl.Code19          = ar.Code19;
            fl.D_FileStatus    = ar.D_FileStatus;
            fl.DocCodesExplain = "";
            fl.DocPages        = ar.DocPages;
            fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime;
            fl.Ext_1 = "";
            fl.Ext_2 = ar.Ext_2;
            fl.Ext_3 = ar.Ext_3;
            fl.Ext_4 = ar.Ext_4;
            fl.Ext_5 = ar.Ext_5;
            fl.Title = ar.Title;
            //fl.FK_ArchiveID = ar.FK_Archive;
            fl.FK_CategoryID = ar.FK_CategoryID;
            fl.FormationDept = ar.FormationDept;
            fl.FormationTime = ar.FormationTime;
            fl.Importer      = ar.Importer;
            fl.ImporterTime  = ar.ImporterTime;
            fl.OriginalID    = ar.OriginalID;
            fl.OtherTitle    = ar.OtherTitle;
            fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime;
            fl.RelatedCode = ar.RelatedCode;
            fl.Revision    = ar.Revision;
            #endregion
            sXml = hn_oa2dp.GenOAFileNode(fl);
            /****完成生成File节点************************************************************************/

            #region 始生成Attachment节点
            /****开始生成Attachment节点******************************************************************/
            string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb");
            //"http://172.29.128.239";
            //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName");
            for (int i = 0; i < ucAttachment.UCDataList.Count; i++)
            {
                FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode();
                CFuJian file = ucAttachment.UCDataList[i];

                at.DocumentName  = "请示报告";//file.FileName;
                at.FK_FileID     = "";
                at.MakeDate      = "";
                at.MakeUnit      = "";
                at.PublishedTime = "";
                at.Remark        = "";

                at.ServerWeb = sServerWeb;
                Double iSize = 0;
                string sSize = file.Size.ToUpper();
                if (sSize.Contains("K"))
                {
                    sSize = sSize.Replace("K", "");
                    iSize = Convert.ToDouble(sSize);
                    iSize = iSize * 1024;
                }
                if (sSize.Contains("M"))
                {
                    sSize = sSize.Replace("M", "");
                    iSize = Convert.ToDouble(sSize);
                    iSize = iSize * 1024 * 1024;
                }
                at.Size     = ((int)iSize).ToString();
                at.TimeSize = "";
                at.Title    = file.Alias;
                at.Type     = file.Type;
                at.Url      = file.URL;

                sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at);
            }
            #endregion
            /****完成生成Attachment节点******************************************************************/

            return(sXml);
        }
        private string Devolve2DC(HN_OA2DC oaDev)
        {
            string sXml = "";

            List <FounderSoftware.ADIM.OA.OA2DC.DevKVItem> ls = oaDev.MapFunction("DC", base.TemplateName);

            B_Finance entity = this.ControlToEntity(false) as B_Finance;

            entity.FormsData = XmlUtility.SerializeXml(entity);

            FounderSoftware.ADIM.OA.OA2DC.HNDC_CArchiveNode ar = new HNDC_CArchiveNode();
            FounderSoftware.ADIM.OA.OA2DC.HNDC_CFileNode    fl = new HNDC_CFileNode();

            //string sPath = @"E:\QWDMS\Non Baseline Library\Development\03 Code\FounderSoftware.ADIM\FounderSoftware.ADIM.OA\OADevolveLib\DevolveConfig.xml";

            #region 开始生成Archive节点
            ar.System = "OA_" + base.IdentityID.ToString();
            string ObjPlatForm = oaDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object");
            switch (ObjPlatForm)
            {
            case "DC":
                ar.SysFlag = "1";
                break;

            case "FC":
                ar.SysFlag = "2";
                break;

            default:
                ar.SysFlag = "1";
                break;
            }

            #region 根据DevolveConfig.xml配置参数设置Archive归档节点
            for (int i = 0; i < ls.Count; i++)
            {
                string skey  = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sKey;
                string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sValue;
                string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DC.DevKVItem).sType;
                ar.SetAttribute(skey, oaDev.PreHandel(entity, sName, sType) /*(entity.GetVal(sName) as string)*/);
            }
            ar.SetOAArchiveNode();
            // 其他节点处理应放置在SetOAArchiveNode方法之后

            //return Devolve2DP(oaDev, sDPID, ar);
            #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点

            ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString();
            #endregion
            sXml = oaDev.GenOAArchiveNode(ar, base.TemplateName);

            /****开始生成File节点************************************************************************/
            #region 开始生成File节点
            fl.AuthorizeTime   = ar.AuthorizeTime;
            fl.Code            = ar.Code;
            fl.Code19          = ar.Code19;
            fl.D_FileStatus    = ar.D_FileStatus;
            fl.DocCodesExplain = "";
            fl.DocPages        = ar.DocPages;
            fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime;
            fl.Ext_1         = ar.Ext_1;
            fl.Ext_2         = ar.Ext_2;
            fl.Ext_3         = ar.Ext_3;
            fl.Ext_4         = ar.Ext_4;
            fl.Ext_5         = ar.Ext_5;
            fl.Title         = ar.Title;
            fl.FK_ArchiveID  = ar.FK_Archive;
            fl.FK_CategoryID = ar.FK_CategoryID;
            fl.FormationDept = ar.FormationDept;
            fl.FormationTime = ar.FormationTime;
            fl.Importer      = ar.Importer;
            fl.ImporterTime  = ar.ImporterTime;
            fl.OriginalID    = ar.OriginalID;
            fl.OtherTitle    = ar.OtherTitle;
            fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime;
            fl.RelatedCode = ar.RelatedCode;
            fl.Revision    = ar.Revision;
            #endregion
            sXml = oaDev.GenOAFileNode(fl);
            /****完成生成File节点************************************************************************/

            #region 始生成Attachment节点
            /****开始生成Attachment节点******************************************************************/
            string sServerWeb = oaDev.GetCfgNodeValues("/Devolve/Other/ServerWeb");
            //"http://172.29.128.239";
            //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName");
            for (int i = 0; i < ucAttachment.UCDataList.Count; i++)
            {
                HNDC_CAttachmentNode at = new HNDC_CAttachmentNode();
                CFuJian file            = ucAttachment.UCDataList[i];

                at.DocumentName  = "请示报告";//file.FileName;
                at.FK_FileID     = "";
                at.MakeDate      = "";
                at.MakeUnit      = "";
                at.PublishedTime = "";
                at.Remark        = "";

                at.ServerWeb = sServerWeb;
                Double iSize = 0;
                string sSize = file.Size.ToUpper();
                if (sSize.Contains("K"))
                {
                    sSize = sSize.Replace("K", "");
                    iSize = Convert.ToDouble(sSize);
                    iSize = iSize * 1024;
                }
                if (sSize.Contains("M"))
                {
                    sSize = sSize.Replace("M", "");
                    iSize = Convert.ToDouble(sSize);
                    iSize = iSize * 1024 * 1024;
                }
                at.Size     = ((int)iSize).ToString();
                at.TimeSize = "";
                at.Title    = file.Alias;
                at.Type     = file.Type;
                at.Url      = file.URL;

                sXml = oaDev.GenOAAttachmentNode(fl.FK_ArchiveID, at);
            }
            #endregion
            /****完成生成Attachment节点******************************************************************/

            return(sXml);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //InitPrint();
            this.SubmitEvents();
            B_Finance b_Finance = new B_Finance();
            string url = b_Finance.GetFinanceUrl(txtChuChaDanHao.Text);

            linkShow.NavigateUrl = url;
        }
Exemple #11
0
        /// <summary>
        /// 提交按钮处理事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void SubmitBtn_Click(object sender, EventArgs e)
        {
            try
            {
                //提交动作
                string strActionName = ((Button)sender).Text.Trim();
                base.SubAction = strActionName;

                string strErrorMessage = string.Empty;

                //保存
                if (strActionName == ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                {
                    B_Finance entity = ControlToEntity(true) as B_Finance;
                    entity.SubmitAction = strActionName;
                    base.FormSubmit(true, strActionName, null, entity);
                }
                else
                {
                    B_Finance entity = ControlToEntity(false) as B_Finance;
                    entity.SubmitAction = strActionName;

                    //撤销
                    if (strActionName == ProcessConstString.SubmitAction.ACTION_CANCEL)
                    {
                        base.FormCancel(entity);
                    }
                    else
                    {
                        //返回验证信息
                        entity.GetSubmitMessage(base.StepName, strActionName, ref strErrorMessage);
                        if (!string.IsNullOrEmpty(strErrorMessage))
                        {
                            JScript.ShowMsgBox(this.Page, strErrorMessage, false);
                            return;
                        }
                        else
                        {
                            switch (base.StepName)
                            {
                            case ProcessConstString.StepName.STEP_DRAFT:
                                strActionName = base.SubAction;
                                break;

                            case ProcessConstString.StepName.FinanceStepName.STEP_DISTRIBUTION:
                                if (strActionName == ProcessConstString.SubmitAction.FinanceAction.ACTION_WCGD)
                                {
                                    if (!string.IsNullOrEmpty(entity.ChuanYueDeptID) || !string.IsNullOrEmpty(entity.ChuanYueRenYuanID))
                                    {
                                        base.Circulate(entity.ChuanYueDeptID, "1", string.Empty, entity.ChuanYueRenYuanID, "1", false, string.Empty, false);
                                    }

                                    try
                                    {
                                        string strMessage = string.Empty;
                                        this.Devolve(out strMessage);
                                        base.Devolved(base.ProcessID, base.TemplateName);
                                        JScript.Alert("归档成功!\\n流水号:" + strMessage, false);
                                    }
                                    catch (Exception ex)
                                    {
                                        base.WriteLog(ex.Message);
                                        JScript.Alert("归档失败!请查看配置是否正确!", false);
                                        return;
                                    }
                                }
                                break;
                            }
                        }

                        //调用工作流
                        Hashtable nValues = entity.GetProcNameValue(base.StepName, strActionName);
                        base.FormSubmit(false, strActionName, nValues, entity);
                    }
                }
            }
            catch (Exception ex)
            {
                base.ShowMsgBox(this.Page, MsgType.VbExclamation, ex.Message);
            }
        }
Exemple #12
0
        /// <summary>
        /// 实体赋值
        /// </summary>
        /// <param name="IsSave"></param>
        /// <returns></returns>
        protected override EntityBase ControlToEntity(bool IsSave)
        {
            B_Finance entity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance();

            //附件
            entity.FileList = ucAttachment.UCDataList;

            entity.ShenPiYiJian = this.txtShenPiYiJian.Text;
            #region 提示信息、承办情况
            //提示信息、承办情况
            if (!IsSave)
            {
                if (!string.IsNullOrEmpty(this.txtTianJia.Text))
                {
                    entity.MessageAdd = string.Empty;
                    entity.Message    = this.txtTiShiXinXi.Text + (string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName) + "[" + DateTime.Now.ToString(DateFormat) + "]:(" + base.StepName + ")" + this.txtTianJia.Text + "\n";
                }
            }
            else
            {
                entity.Message    = this.txtTiShiXinXi.Text;
                entity.MessageAdd = this.txtTianJia.Text;
            }
            #endregion

            switch (base.StepName)
            {
                #region 拟稿
            case ProcessConstString.StepName.STEP_DRAFT:

                //抄送
                entity.CopySend       = this.txtChaoSong.Text;
                entity.ChaoSongDeptID = this.txtChaoSongDeptID.Text;
                entity.ChaoSongID     = this.txtChaoSongID.Text;

                //编制部门、编制部门ID
                if (this.ddlBianZhiBuMen.Items.Count > 0)
                {
                    entity.Department     = this.ddlBianZhiBuMen.SelectedItem.Text;
                    entity.BianZhiBuMenID = this.ddlBianZhiBuMen.SelectedValue;
                }
                //部门负责人
                if (this.ddlFuZeRen.Items.Count > 0)
                {
                    entity.DeptPrincipal = this.ddlFuZeRen.SelectedItem.Text;
                    entity.FuZeRenID     = this.ddlFuZeRen.SelectedValue;
                }
                if (IsSave == false)
                {
                    //申请单编号
                    entity.DocumentNo = this.GetFinanceTripNo(entity);
                }
                entity.FeeYuSuan       = this.txtFeeYuSuan.Text;
                entity.FeeFaSheng      = this.txtFeeFaSheng.Text;
                entity.ZhiWu           = this.drpZhiWu.SelectedValue;
                entity.ZhiCheng        = this.drpZhiCheng.SelectedValue;
                entity.TongXingRenYuan = this.txtTongXing.Text;

                //主题、标题
                //entity.Subject = SysString.InputText(this.txtZhuTi.Text);
                entity.DocumentTitle = SysString.InputText(this.txtZhuTi.Text);

                //内容
                //entity.Content = SysString.TextToHtmlCode(this.txtChuChaiRenWu.Text);
                entity.Content         = this.txtChuChaiRenWu.Text;
                entity.ChuChaiRenWu    = this.txtChuChaiRenWu.Text;
                entity.ChuFaShiJian    = this.timeChuFa.Text;
                entity.HuiChengShiJian = this.timeHuiCheng.Text;
                entity.ShangWuXinXi    = this.txtShangWu.Text;

                //拟稿人
                entity.Drafter   = this.txtNiGaoRen.Text;
                entity.DrafterID = this.txtNiGaoRenID.Text;

                //老版本用到
                entity.NiGaoRenID = this.txtNiGaoRenID.Text;

                //拟稿日期
                entity.DraftDate = DateTime.Now;

                this.GetFeeComparedSigner(entity);

                break;
                #endregion

                #region 处领导审核
            case ProcessConstString.StepName.FinanceStepName.STEP_DepartLeader:
                if (base.SubAction != ProcessConstString.SubmitAction.ACTION_DENY)
                {
                    //抄送
                    entity.CopySend       = this.txtChaoSong.Text;
                    entity.ChaoSongDeptID = this.txtChaoSongDeptID.Text;
                    entity.ChaoSongID     = this.txtChaoSongID.Text;
                    entity.DocumentTitle  = SysString.InputText(this.txtZhuTi.Text);
                    entity.Content        = this.txtChuChaiRenWu.Text;
                }
                else
                {
                    entity.IsBack = true;
                }
                break;
                #endregion

                #region 订票处
            case ProcessConstString.StepName.FinanceStepName.STEP_BookingOffice:
                entity.ShangWuXinXi = this.txtShangWu.Text;
                break;
                #endregion
            }

            //订票处
            entity.BookingOfficeID = this.txtBookingOfficeID.Text;
            //目的地
            entity.Destination = this.txtDestination.Text;
            return(entity);
        }
Exemple #13
0
        /// <summary>
        /// 实体加载
        /// </summary>
        protected override void EntityToControl()
        {
            B_Finance entity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance();

            //拟稿人
            this.txtNiGaoRen.Text   = string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName;
            this.txtNiGaoRenID.Text = string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID;
            //新版OA时间精确到秒(控制时间的显示格式)
            //bool isOld = entity.DraftDate < base.OAStartTime;
            //职务
            drpZhiWu.DataSource = GetPostList();
            drpZhiWu.DataBind();
            drpZhiCheng.DataSource = GetTitleList();
            drpZhiCheng.DataBind();
            //附件
            ucAttachment.UCDataList   = entity.FileList;
            this.txtFeeYuSuan.Text    = entity.FeeYuSuan;
            this.txtFeeFaSheng.Text   = entity.FeeFaSheng;
            this.txtShenPiYiJian.Text = entity.ShenPiYiJian;
            //编制部门及预算
            if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview)
            {
                OADept.GetDeptByUser(this.ddlBianZhiBuMen, string.IsNullOrEmpty(entity.ReceiveUserID) ? CurrentUserInfo.UserName : entity.ReceiveUserID, 1, true, false);
                FormsMethod.SelectedDropDownList(this.ddlBianZhiBuMen, entity.BianZhiBuMenID); B_FinanceDeptInfo bllInfo = new B_FinanceDeptInfo();
                M_FinanceDeptInfo info = bllInfo.GetFinanceDeptInfoByDeptID(DateTime.Now.Year.ToString(), this.ddlBianZhiBuMen.SelectedValue);

                this.txtFeeYuSuan.Text  = info.TripBudgetCost;
                this.txtFeeFaSheng.Text = info.TripUseCost;

                string ManagerDeptID = OADept.GetDeptID("总经理部");

                Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtFeeFaSheng.Text) ? "0" : txtFeeFaSheng.Text);
                Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtFeeYuSuan.Text) ? "0" : txtFeeYuSuan.Text);
                Double Rate  = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate));
                if ((FeeFa - FeeYu) / FeeYu > Rate)
                {
                    OAUser.GetUserByDeptPost(ddlZongJingLi, ManagerDeptID, OUConstString.PostName.ZONGJINGLI, true, false, 1);
                    ddlZongJingLi.Enabled = true;
                    this.SubmitStatus     = 1;
                }
                else if (FeeFa > FeeYu)
                {
                    OAUser.GetUserByDeptPost(ddlZhuGuanLingDao, ManagerDeptID, OUConstString.PostName.FUZONGJINGLI, true, false, 1);
                    ddlZhuGuanLingDao.Enabled = true;
                    this.SubmitStatus         = 2;
                }
                else if (FeeFa <= FeeYu)
                {
                    OAUser.GetUserByDeptPost(ddlChuLingDao, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.CHUZHANG, false, true, 0);
                    ddlChuLingDao.Enabled = true;
                    this.SubmitStatus     = 3;
                }
                ListItem item = new ListItem(this.txtNiGaoRen.Text, this.txtNiGaoRenID.Text);
                if (ddlChuLingDao.Items.Contains(item))
                {
                    ddlChuLingDao.Items.Clear();
                    OAUser.GetUserByDeptPost(ddlZhuGuanLingDao, ManagerDeptID, OUConstString.PostName.FUZONGJINGLI, true, false, 1);
                    ddlZhuGuanLingDao.Enabled = true;
                    this.SubmitStatus         = 2;
                }
                else if (ddlZhuGuanLingDao.Items.Contains(item))
                {
                    ddlZhuGuanLingDao.Items.Clear();
                    OAUser.GetUserByDeptPost(ddlZongJingLi, ManagerDeptID, OUConstString.PostName.ZONGJINGLI, true, false, 1);
                    ddlZongJingLi.Enabled = true;
                    this.SubmitStatus     = 1;
                }
            }
            else
            {
                FormsMethod.SetDropDownList(this.ddlBianZhiBuMen, entity.BianZhiBuMenID, entity.Department);
                FormsMethod.SetDropDownList(this.ddlZongJingLi, entity.GeneralManagerID, entity.GeneralManager);
                FormsMethod.SetDropDownList(this.ddlZhuGuanLingDao, entity.ChargeLeaderID, entity.ChargeLeader);
                FormsMethod.SetDropDownList(this.ddlChuLingDao, entity.DepartmentLeaderID, entity.DepartmentLeader);
            }
            //申请单编号
            this.txtBianHao.Text = entity.DocumentNo;
            FormsMethod.SelectedDropDownList(this.drpZhiWu, entity.ZhiWu);
            FormsMethod.SelectedDropDownList(this.drpZhiCheng, entity.ZhiCheng);

            //部门负责人
            if (base.StepName == ProcessConstString.StepName.STEP_DRAFT && !base.IsPreview)
            {
                if (this.ddlBianZhiBuMen.Items.Count > 0)
                {
                    OAUser.GetUserByDeptPost(this.ddlFuZeRen, this.ddlBianZhiBuMen.SelectedValue, OUConstString.PostName.CHUZHANG, true, true);
                }
                FormsMethod.SelectedDropDownList(this.ddlFuZeRen, entity.FuZeRenID);
            }
            else
            {
                FormsMethod.SetDropDownList(this.ddlFuZeRen, entity.FuZeRenID, entity.DeptPrincipal);
            }

            //订票处
            if (base.StepName == ProcessConstString.StepName.FinanceStepName.STEP_DepartLeader ||
                base.StepName == ProcessConstString.StepName.FinanceStepName.STEP_ChargeLeader ||
                base.StepName == ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager &&
                !base.IsPreview)
            {
                string[] arrayBookingOffice = OAUser.GetUserByRoleName(OUConstString.RoleName.BookingOffice);
                this.txtBookingOfficeID.Text = arrayBookingOffice[0];
            }

            //是否退回
            if (base.StepName == ProcessConstString.StepName.STEP_DRAFT)
            {
                this.txtIsBack.Text = entity.IsBack.ToString();
            }

            //拟稿人及日期
            if (entity.DraftDate != DateTime.MinValue)
            {
                this.lblNiGaoRiQi.Text = entity.DraftDate.ToString(DateFormat);

                //拟稿人显示非下拉列表框形式
                this.txtNiGaoRen.Visible = false;
                this.lbNiGaoRen.Visible  = true;
                //this.lbNiGaoRen.Text = entity.Drafter + strNewLine + entity.DraftDate.ToString(ConstString.DateFormat.Long);
                this.lbNiGaoRen.Text = entity.Drafter;
            }
            else
            {
                this.lblNiGaoRiQi.Text = DateTime.Now.ToString(DateFormat);
            }

            //抄送
            this.txtChaoSong.Text       = entity.CopySend;
            this.txtChaoSongID.Text     = entity.ChaoSongID;
            this.txtChaoSongDeptID.Text = entity.ChaoSongDeptID;

            //主题
            this.txtZhuTi.Text = entity.DocumentTitle;

            this.txtTongXing.Text = entity.TongXingRenYuan;

            //出差任务
            //this.txtNeiRong.Text = SysString.HtmlToTextCode(entity.Content);
            this.txtChuChaiRenWu.Text = entity.ChuChaiRenWu;
            this.timeChuFa.Text       = entity.ChuFaShiJian;
            this.timeHuiCheng.Text    = entity.HuiChengShiJian;

            //商务信息
            this.txtShangWu.Text = entity.ShangWuXinXi;

            //目的地
            this.txtDestination.Text = entity.Destination;

            //拟稿人
            //this.txtNiGaoRen.Text = entity.Drafter;
            //this.txtNiGaoRenID.Text = entity.NiGaoRenID;

            //提示信息
            this.txtTiShiXinXi.Text   = entity.Message;
            this.txtBanShuiXinXi.Text = entity.Message;

            //提示信息添加
            this.txtTianJia.Text = entity.MessageAdd;

            this.txtGeneralManagerID.Text = entity.GeneralManagerID;

            this.txtChargeLeaderID.Text = entity.ChargeLeaderID;

            this.txtDepartmentLeaderID.Text = entity.DepartmentLeaderID;
        }
        private string GetFeeComparedSigner(B_Finance entity)
        {
            string SignIDs = string.Empty;

            Double FeeFa = Convert.ToDouble(string.IsNullOrEmpty(txtFeeFaSheng.Text) ? "0" : txtFeeFaSheng.Text);
            Double FeeYu = Convert.ToDouble(string.IsNullOrEmpty(txtFeeYuSuan.Text) ? "0" : txtFeeYuSuan.Text);
            Double Rate = (string.IsNullOrEmpty(FeeRate) == true ? 0.1 : Convert.ToDouble(FeeRate));
            if ((FeeFa - FeeYu) / FeeYu > Rate)
            {
                if (ddlZongJingLi.SelectedItem != null)
                {
                    //总经理 - 以及大于10%否(大于就总经理签)
                    entity.GeneralManager = ddlZongJingLi.SelectedItem.Text;
                    entity.GeneralManagerID = ddlZongJingLi.SelectedValue;
                    base.SubAction = "提交总经理";
                }
            }
            else if (FeeFa > FeeYu)
            {
                if (ddlZhuGuanLingDao.SelectedItem != null)
                {
                    //主管领导 - 已经发生的差旅费是否大于预算(大于就主管领导签)
                    entity.ChargeLeader = ddlZhuGuanLingDao.SelectedItem.Text;
                    entity.ChargeLeaderID = ddlZhuGuanLingDao.SelectedValue;
                    base.SubAction = "提交主管领导";
                }
            }
            else if (FeeFa <= FeeYu)
            {
                //处领导 -
                if (ddlChuLingDao.SelectedItem != null)
                {
                    entity.DepartmentLeader = ddlChuLingDao.SelectedItem.Text;
                    entity.DepartmentLeaderID = ddlChuLingDao.SelectedValue;
                }
                base.SubAction = "提交处领导";
            }

            if (this.SubmitStatus==2)
            {
                entity.ChargeLeader = ddlZhuGuanLingDao.SelectedItem.Text;
                entity.ChargeLeaderID = ddlZhuGuanLingDao.SelectedValue;
                base.SubAction = "提交主管领导";
            }
            else if (this.SubmitStatus==1)
            {
                entity.GeneralManager = ddlZongJingLi.SelectedItem.Text;
                entity.GeneralManagerID = ddlZongJingLi.SelectedValue;
                base.SubAction = "提交总经理";
            }
            return SignIDs;
        }
 /// <summary>
 ///申请单的编号规则 CC+部门代码+年度+四位流水号
 /// </summary>
 /// <returns></returns>
 protected string GetFinanceTripNo(B_Finance entity)
 {
     Department dept = OADept.GetDeptByDeptID(this.ddlBianZhiBuMen.SelectedValue);
     string strLine = "-";
     string strYear = DateTime.Now.Year.ToString();
     B_DocumentNo_A b_documentno_a = new B_DocumentNo_A();
     return "CCSQ" + strLine + dept.No + strLine + b_documentno_a.GetNo(ProcessConstString.TemplateName.FINANCE_TRIPAPPLY, strYear);
 }
        public void Devolve(out string sResult)
        {
            sResult = "";
            string sPath = HttpContext.Current.Server.MapPath((@"~\Config\DevolveConfig.xml"));

            FounderSoftware.ADIM.OA.OA2DC.HN_OA2DC dcDev = new HN_OA2DC(sPath);
            FounderSoftware.ADIM.OA.OA2DP.HN_OA2DP dpDev = new HN_OA2DP(sPath);

            // 开始发送归档

            /*
             * 根据DevoleConfig.xml配置文件的中相应流程的<Object>DC</Object>节点来判断归档到哪个系统中
             * 若配置中为DC则表明调用OA2DC.DLL接口进行归档,若为DP则表明调用OA2DP.DLL接口进行归档
             */
            string xml        = "";
            string objDevolve = dcDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/Object");
            string s          = "";

            //EntityLetterSend entity = new EntityLetterSend(base.tableName);
            //SetEntity(entity, true);
            B_Finance entity = this.ControlToEntity(false) as B_Finance;

            entity.FormsData = XmlUtility.SerializeXml(entity);
            if (objDevolve.ToUpper() == "DC" || objDevolve.ToUpper() == "FC")
            {
                FounderSoftware.ADIM.OA.OA2DC.OA2DC oa2dc = new FounderSoftware.ADIM.OA.OA2DC.OA2DC();
                xml = Devolve2DC(dcDev);

                s        = oa2dc.SendDevolve(xml, entity.FormsData, "请示报告");
                sResult += (s + @"\r\n");
                try
                {
                    Convert.ToInt32(s);
                }
                catch
                {
                    throw new Exception(s);
                }
                //JScript.ShowMsgBox(Page, MsgType.VbCritical, s);
            }


            if (objDevolve.ToUpper() == "DP")
            {
                FounderSoftware.ADIM.OA.OA2DP.OA2DP oa2dp = new FounderSoftware.ADIM.OA.OA2DP.OA2DP();
                string sOADPIDs = dpDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/DPID");

                // 若DevolveConifg.xml配置文件中未配置CategID则根据流程实体中的处室ID归档

                string[] arrDPID = sOADPIDs.Split(new char[] { ',', ';' });
                for (int i = 0; i < arrDPID.Length; i++)
                {
                    try
                    {
                        Convert.ToInt32(arrDPID[i]);
                    }
                    catch
                    {
                        continue;
                    }
                    xml      = Devovle2DP2(dpDev, arrDPID[i]);
                    s        = oa2dp.SendDevolve(xml, entity.FormsData, "请示报告");
                    sResult += (s + @"\r\n");
                    try
                    {
                        Convert.ToInt32(s);
                    }
                    catch
                    {
                        throw new Exception(s);
                    }
                    //JScript.ShowMsgBox(Page, MsgType.VbCritical, s);
                }

                string   sOptionDPID = dpDev.GetCfgNodeValues("/Devolve/Process[@Name='" + base.TemplateName + "']/OptionDPID");
                string[] arrOpDPID   = sOptionDPID.Split(new char[] { ',' });
                for (int i = 0; i < arrOpDPID.Length; i++)
                {
                    if (entity.GetVal(arrOpDPID[i]) == null)
                    {
                        continue;
                    }
                    string   sDPID = entity.GetVal(arrOpDPID[i]).ToString();
                    string[] IDs   = sDPID.Split(new char[] { ';', ',' });
                    for (int j = 0; j < IDs.Length; j++)
                    {
                        try
                        {
                            Convert.ToInt32(IDs[j]);
                        }
                        catch
                        {
                            continue;
                        }
                        xml      = Devovle2DP2(dpDev, IDs[j]);
                        s        = oa2dp.SendDevolve(xml, entity.FormsData, "请示报告");
                        sResult += (s + @"\r\n");
                        try
                        {
                            Convert.ToInt32(s);
                        }
                        catch
                        {
                            throw new Exception(s);
                        }
                    }
                    //JScript.ShowMsgBox(Page, MsgType.VbCritical, s);
                }

                #region 注释保留
                //if (string.IsNullOrEmpty(sOADPIDs))
                //{
                //    string[] sDPID1 = entity.BianZhiBuMenID.Split(new char[] { ',', ';' });
                //    string[] sDPID2 = entity.ChengBanBuMenID.Split(new char[] { ',', ';' });
                //    if (sDPID1 != null)
                //    {
                //        for (int i = 0; i < sDPID1.Length; i++)
                //        {
                //            if (string.IsNullOrEmpty(sDPID1[i])) continue;
                //            xml = Devolve2DP(dpDev, sDPID1[i]);
                //            s = oa2dp.SendDevolve(xml, entity.FormsData, "请示报告");
                //            //JScript.ShowMsgBox(Page, MsgType.VbCritical, s);
                //        }
                //    }

                //    if (sDPID2 != null)
                //    {
                //        for (int i = 0; i < sDPID2.Length; i++)
                //        {
                //            if (string.IsNullOrEmpty(sDPID2[i])) continue;
                //            xml = Devolve2DP(dpDev, sDPID2[i]);
                //            s = oa2dp.SendDevolve(xml, entity.FormsData, "请示报告");
                //            //JScript.ShowMsgBox(Page, MsgType.VbCritical, s);
                //        }
                //    }
                //}
                //else
                //// 根据配置文件的处室ID归档
                //{
                //    string[] arrDPID = sOADPIDs.Split(new char[] { ',' });
                //    for (int i = 0; i < arrDPID.Length; i++)
                //    {
                //        xml = Devolve2DP(dpDev, arrDPID[i]);
                //        s = oa2dp.SendDevolve(xml, entity.FormsData, "请示报告");
                //        //JScript.ShowMsgBox(Page, MsgType.VbCritical, s);
                //    }
                //}
                #endregion
            }
            //string rest = oa2dc.CallBack(Convert.ToInt32(s), true, s);
            //string rest = CDevolve.CallBack(Convert.ToInt32(s), true, s, doc.InnerXml);

            //IMessage ms = new WebFormMessage(Page, s);
            //ms.Show();
        }
        private string Devovle2DP2(HN_OA2DP hn_oa2dp, string sDPID)
        {
            string sXml = "";

            FounderSoftware.ADIM.OA.OA2DP.HNDP_CArchiveNode ar = new HNDP_CArchiveNode();

            List <FounderSoftware.ADIM.OA.OA2DP.DevKVItem> ls = hn_oa2dp.MapFunction("DP", base.TemplateName);

            B_Finance entity = this.ControlToEntity(false) as B_Finance;

            entity.FormsData = XmlUtility.SerializeXml(entity);

            //ar.SetAttribute("FormationTime"/*配置文件中的归档字段*/, "2009-12-12"/*cEntity.GetValue(配置文件中的实体属性名)*/);
            //string sValue = ar.GetAttribute("FormationTime");
            #region 生成Archive节点
            ar.System = "OA_" + base.IdentityID.ToString();

            #region 根据DevolveConfig.xml配置参数设置Archive归档节点
            for (int i = 0; i < ls.Count; i++)
            {
                string skey  = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sKey;
                string sName = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sValue;
                string sType = (ls[i] as FounderSoftware.ADIM.OA.OA2DP.DevKVItem).sType;
                ar.SetAttribute(skey, hn_oa2dp.PreHandel(entity, sName, sType, true) /*(entity.GetVal(sName) as string)*/);
            }
            ar.SetOAArchiveNode();
            // 其他节点处理应放置在SetOAArchiveNode方法之后
            ar.FK_DPID = sDPID;
            //return Devolve2DP(oaDev, sDPID, ar);
            #endregion 根据DevolveConfig.xml配置参数设置Archive归档节点

            ar.ElectronicDocumentCount = ucAttachment.UCDataList.Count.ToString();
            #endregion
            sXml = hn_oa2dp.GenOAArchiveNode(ar, base.TemplateName);

            FounderSoftware.ADIM.OA.OA2DP.HNDP_CFileNode fl = new HNDP_CFileNode();
            /****开始生成File节点************************************************************************/
            #region 开始生成File节点
            fl.AuthorizeTime   = ar.AuthorizeTime;
            fl.Code            = ar.Code;
            fl.Code19          = ar.Code19;
            fl.D_FileStatus    = ar.D_FileStatus;
            fl.DocCodesExplain = "";
            fl.DocPages        = ar.DocPages;
            fl.ElectronicDocumentTransceiverTime = ar.ElectronicDocumentTransceiverTime;
            fl.Ext_1 = "";
            fl.Ext_2 = ar.Ext_2;
            fl.Ext_3 = ar.Ext_3;
            fl.Ext_4 = ar.Ext_4;
            fl.Ext_5 = ar.Ext_5;
            fl.Title = ar.Title;
            //fl.FK_ArchiveID = ar.FK_Archive;
            fl.FK_CategoryID = ar.FK_CategoryID;
            fl.FormationDept = ar.FormationDept;
            fl.FormationTime = ar.FormationTime;
            fl.Importer      = ar.Importer;
            fl.ImporterTime  = ar.ImporterTime;
            fl.OriginalID    = ar.OriginalID;
            fl.OtherTitle    = ar.OtherTitle;
            fl.PaperDocumentTransceiverTime = ar.PaperDocumentTransceiverTime;
            fl.RelatedCode = ar.RelatedCode;
            fl.Revision    = ar.Revision;
            #endregion
            sXml = hn_oa2dp.GenOAFileNode(fl);
            /****完成生成File节点************************************************************************/

            #region 始生成Attachment节点
            /****开始生成Attachment节点******************************************************************/
            string sServerWeb = hn_oa2dp.GetCfgNodeValues("/Devolve/Other/ServerWeb");
            //"http://172.29.128.239";
            //string sDocumentName = oaDev.GetCfgNodeValues("/Devolve/Other/DocumentName");
            for (int i = 0; i < ucAttachment.UCDataList.Count; i++)
            {
                FounderSoftware.ADIM.OA.OA2DP.HNDP_CAttachmentNode at = new HNDP_CAttachmentNode();
                CFuJian file = ucAttachment.UCDataList[i];

                at.DocumentName  = "请示报告";//file.FileName;
                at.FK_FileID     = "";
                at.MakeDate      = "";
                at.MakeUnit      = "";
                at.PublishedTime = "";
                at.Remark        = "";

                at.ServerWeb = sServerWeb;
                Double iSize = 0;
                string sSize = file.Size.ToUpper();
                if (sSize.Contains("K"))
                {
                    sSize = sSize.Replace("K", "");
                    iSize = Convert.ToDouble(sSize);
                    iSize = iSize * 1024;
                }
                if (sSize.Contains("M"))
                {
                    sSize = sSize.Replace("M", "");
                    iSize = Convert.ToDouble(sSize);
                    iSize = iSize * 1024 * 1024;
                }
                at.Size     = ((int)iSize).ToString();
                at.TimeSize = "";
                at.Title    = file.Alias;
                at.Type     = file.Type;
                at.Url      = file.URL;

                sXml = hn_oa2dp.GenOAAttachmentNode(fl.FK_ArchiveID, at);
            }
            #endregion
            /****完成生成Attachment节点******************************************************************/

            return(sXml);
        }
Exemple #18
0
        /// <summary>
        /// 控件初始设置
        /// </summary>
        protected override void SetControlStatus()
        {
            B_Finance entity = base.EntityData != null ? base.EntityData as B_Finance : new B_Finance();

            //附件
            ucAttachment.UCTemplateName = base.TemplateName;
            ucAttachment.UCProcessID    = base.ProcessID;
            ucAttachment.UCWorkItemID   = base.WorkItemID;
            ucAttachment.UCTBID         = base.IdentityID.ToString();

            #region 弹出窗口
            //抄送
            this.OASelectUC1.UCSelectType         = "2";
            this.OASelectUC1.UCDeptIDControl      = this.txtChaoSongDeptID.ClientID;
            this.OASelectUC1.UCDeptUserIDControl  = this.txtChaoSongID.ClientID;
            this.OASelectUC1.UCDeptAndUserControl = this.txtChaoSong.ClientID;
            this.OASelectUC1.UCTemplateName       = base.TemplateName;
            this.OASelectUC1.UCFormName           = "抄送";

            //分发范围
            this.OASelectUC2.UCSelectType         = "2";
            this.OASelectUC2.UCDeptIDControl      = this.txtChuanYueDeptIDs.ClientID;
            this.OASelectUC2.UCDeptUserIDControl  = this.txtChuanYueRenIDs.ClientID;
            this.OASelectUC2.UCDeptAndUserControl = this.txtChuanYueRenYuan.ClientID;
            this.OASelectUC2.UCTemplateName       = base.TemplateName;
            this.OASelectUC2.UCFormName           = "分发范围";

            #endregion

            OAControl controls = new OAControl();

            if (!base.IsPreview)
            {
                this.txtPiShiYiJian.ToolTip  = "2000字符以内";
                this.ddlBianZhiBuMen.ToolTip = "自己所属的处室";
                FileTitle = "海南核电有限公司出差(培训)申请单";
            }

            if (!base.IsPreview)
            {
                switch (base.StepName)
                {
                    #region 拟稿
                case ProcessConstString.StepName.STEP_DRAFT:
                    this.btnCancel.Attributes.Add("onclick", "javascript: if(!confirm('确定要撤销该流程吗?')){return false;}else{DisableButtons();}");

                    //控制撤销按钮显示
                    this.btnCancel.Visible = this.txtIsBack.Text == "True";



                    this.txtBianHao.ToolTip = "提交后自动生成";
                    if (string.IsNullOrEmpty(base.WorkItemID))
                    {
                        this.lbJs.Text = "<script>ShowMyDiv();</script>";
                    }

                    controls.EnableControls = new Control[] { this.OASelectUC1, this.btnTiJiaoShenHe, this.btnSave };
                    controls.YellowControls = new Control[] { this.txtChaoSong };

                    if (this.SubmitStatus == 1)
                    {
                        controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZhuGuanLingDao, ddlChuLingDao };
                    }
                    else if (this.SubmitStatus == 2)
                    {
                        controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZongJingLi, ddlChuLingDao };
                    }
                    else if (this.SubmitStatus == 3)
                    {
                        controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng, ddlZongJingLi, ddlZhuGuanLingDao };
                    }
                    else
                    {
                        controls.DisEnableControls = new Control[] { this.txtFeeYuSuan, this.txtFeeFaSheng };
                    }
                    break;
                    #endregion

                    #region 处领导审核
                case ProcessConstString.StepName.FinanceStepName.STEP_DepartLeader:
                    controls.EnableControls    = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian };
                    controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao };
                    controls.YellowControls    = new Control[] { this.txtChaoSong };
                    break;
                    #endregion

                    #region 主管领导审核
                case ProcessConstString.StepName.FinanceStepName.STEP_ChargeLeader:
                    controls.EnableControls    = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian };
                    controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao };
                    controls.YellowControls    = new Control[] { this.txtChaoSong };
                    break;
                    #endregion

                    #region 总经理审核
                case ProcessConstString.StepName.FinanceStepName.STEP_GeneralManager:
                    controls.EnableControls    = new Control[] { this.OASelectUC1, this.btnShenHeWanCheng, this.btnTuiHui, this.btnSave, this.txtShenPiYiJian };
                    controls.DisEnableControls = new Control[] { this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao };
                    controls.YellowControls    = new Control[] { this.txtChaoSong };
                    break;
                    #endregion

                    #region 订票处
                case ProcessConstString.StepName.FinanceStepName.STEP_BookingOffice:

                    controls.EnableControls    = new Control[] { this.OASelectUC1, this.txtShangWu, this.btnDingPiao, this.btnTuiHui, this.btnSave };
                    controls.DisEnableControls = new Control[] { this.txtZhuTi, this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtChuChaiRenWu, this.txtFeeYuSuan, this.txtFeeFaSheng, this.ddlZongJingLi, this.ddlZhuGuanLingDao, this.ddlChuLingDao };
                    controls.YellowControls    = new Control[] { this.txtChaoSong };
                    break;
                    #endregion

                    #region 反馈报销人
                case ProcessConstString.StepName.FinanceStepName.STEP_FeedBack:

                    FormsMethod.SetControlAll(this);
                    controls.EnableControls    = new Control[] { this.OASelectUC1, this.btnApplyComplete, this.btnSave };
                    controls.DisEnableControls = new Control[] { this.txtZhuTi, this.ddlBianZhiBuMen, this.txtTongXing, this.txtDestination, this.txtFeeYuSuan, this.txtFeeFaSheng };
                    controls.YellowControls    = new Control[] { this.txtChaoSong };
                    break;
                    #endregion
                }

                //设置所有控件状态
                controls.SetControls();
            }
            else
            {
                //ucAttachment.UCIsEditable = false;
                FormsMethod.SetControlAll(this);
            }
        }