protected void OpenForm(int formID)
    {
        FormTableAdapter taForm = new FormTableAdapter();

        taForm.FillByID(this.InnerDS.Form, formID);
        FormDS.FormRow        rowForm     = this.InnerDS.Form[0];
        FormApplyTableAdapter taFormApply = new FormApplyTableAdapter();

        taFormApply.FillByID(this.InnerDS.FormApply, formID);
        FormDS.FormApplyRow rowFormApply = this.InnerDS.FormApply[0];
        //赋值
        this.ViewState["BeginPeriod"]          = rowFormApply.BeginPeriod.ToShortDateString();
        this.ViewState["EndPeriod"]            = rowFormApply.EndPeriod.ToShortDateString();
        this.BeginPeriodCtl.Text               = rowFormApply.BeginPeriod.ToString("yyyy-MM");
        this.EndPeriodCtl.Text                 = rowFormApply.EndPeriod.ToString("yyyy-MM");
        this.ViewState["ExpenseSubCategoryID"] = rowFormApply.ExpenseSubCategoryID.ToString();
        this.ExpenseSubCategoryCtl.Text        = new MasterDataBLL().GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID);
        this.ViewState["CustomerID"]           = rowFormApply.CustomerID.ToString();
        ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(rowFormApply.CustomerID);
        this.CustomerNameCtl.Text = customer.CustomerName;
        //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName;
        this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString();

        this.ShopDDL.SelectedValue        = rowFormApply.ShopID.ToString();
        this.PaymentTypeDDL.SelectedValue = rowFormApply.PaymentTypeID.ToString();
        if (!rowFormApply.IsContractNoNull())
        {
            this.ContractNoCtl.Text = rowFormApply.ContractNo;
        }
        if (!rowFormApply.IsRemarkNull())
        {
            this.RemarkCtl.Text = rowFormApply.Remark;
        }
        if (!rowFormApply.IsAttachedFileNameNull())
        {
            this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName;
        }
        if (!rowFormApply.IsRealAttachedFileNameNull())
        {
            this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName;
        }

        if (!rowFormApply.IsPromotionBeginDateNull())
        {
            this.UCPromotionBegin.SelectedDate = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd");
        }
        if (!rowFormApply.IsPromotionEndDateNull())
        {
            this.UCPromotionEnd.SelectedDate = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd");
        }
        this.PromotionScopeDDL.SelectedValue = rowFormApply.PromotionScopeID.ToString();
        this.PromotionTypeDDL.SelectedValue  = rowFormApply.PromotionTypeID.ToString();
        if (!rowFormApply.IsPromotionDescNull())
        {
            this.PromotionDescCtl.Text = rowFormApply.PromotionDesc;
        }
        this.ShelfTypeDDL.SelectedValue = rowFormApply.ShelfTypeID.ToString();
        if (!rowFormApply.IsFirstVolumeNull())
        {
            this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString();
        }
        if (!rowFormApply.IsSecondVolumeNull())
        {
            this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString();
        }
        if (!rowFormApply.IsThirdVolumeNull())
        {
            this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString();
        }
        if (!rowFormApply.IsEstimatedSaleVolumeNull())
        {
            this.txtEstimatedSaleVolume.Text = rowFormApply.EstimatedSaleVolume.ToString();
        }
        if (!rowFormApply.IsPackageUnitPriceNull())
        {
            this.txtPackageUnitPrice.Text = rowFormApply.PackageUnitPrice.ToString("N");
        }
        if (!rowFormApply.IsFormApplyNameNull())
        {
            this.txtFormApplyName.Text = rowFormApply.FormApplyName.ToString();
        }
        if (!rowFormApply.IsReimburseRequirementsNull())
        {
            int ReimburseRequirement = rowFormApply.ReimburseRequirements;
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Picture) == (int)SystemEnums.ReimburseRequirements.Picture)
            {
                chkListReimburseRequirements.Items[0].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Agreement) == (int)SystemEnums.ReimburseRequirements.Agreement)
            {
                chkListReimburseRequirements.Items[1].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DeliveryOrder) == (int)SystemEnums.ReimburseRequirements.DeliveryOrder)
            {
                chkListReimburseRequirements.Items[2].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Contract) == (int)SystemEnums.ReimburseRequirements.Contract)
            {
                chkListReimburseRequirements.Items[3].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DM) == (int)SystemEnums.ReimburseRequirements.DM)
            {
                chkListReimburseRequirements.Items[4].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Other) == (int)SystemEnums.ReimburseRequirements.Other)
            {
                chkListReimburseRequirements.Items[5].Selected = true;
            }
        }
        // 打开明细表
        FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter();

        taDetail.FillByFormID(this.InnerDS.FormApplyDetailView, formID);
        new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID);
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        if (!this.IsPostBack)
        {
            PageUtility.SetContentTitle(this.Page, "方案申请");
            this.Page.Title = "方案申请";


            // 用户信息,职位信息
            AuthorizationDS.StuffUserRow stuffUser       = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
            AuthorizationDS.PositionRow  rowUserPosition = (AuthorizationDS.PositionRow)Session["Position"];
            this.ViewState["StuffUserID"]  = stuffUser.StuffUserId;
            this.ViewState["PositionID"]   = rowUserPosition.PositionId;
            this.ViewState["FlowTemplate"] = new AuthorizationBLL().GetFlowTemplate((int)SystemEnums.BusinessUseCase.FormApply, stuffUser.StuffUserId);

            this.StuffNameCtl.Text         = stuffUser.StuffName;
            this.PositionNameCtl.Text      = rowUserPosition.PositionName;
            this.DepartmentNameCtl.Text    = new OUTreeBLL().GetOrganizationUnitById(rowUserPosition.OrganizationUnitId).OrganizationUnitName;
            this.ViewState["DepartmentID"] = rowUserPosition.OrganizationUnitId;
            this.AttendDateCtl.Text        = stuffUser.AttendDate.ToShortDateString();

            if (this.Request["RejectObjectID"] != null)
            {
                this.ViewState["RejectedObjectID"] = int.Parse(this.Request["RejectObjectID"].ToString());
            }
            //如果是草稿进行赋值
            if (Request["ObjectId"] != null)
            {
                this.ViewState["ObjectId"] = int.Parse(Request["ObjectId"]);
                if (this.Request["RejectObjectID"] == null)
                {
                    this.DeleteBtn.Visible = true;
                }
                else
                {
                    this.DeleteBtn.Visible = false;
                }
                OpenForm(int.Parse(this.ViewState["ObjectId"].ToString()));
            }
            else
            {
                this.DeleteBtn.Visible = false;
                if (Request["CustomerID"] != null)
                {
                    this.ViewState["CustomerID"] = Request["CustomerID"];
                }
                else
                {
                    this.Session["ErrorInfor"] = "未找到客户,请联系管理员";
                    Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
                }
                if (Request["BeginPeriod"] != null && Request["EndPeriod"] != null)
                {
                    this.ViewState["BeginPeriod"] = Request["BeginPeriod"];
                    this.ViewState["EndPeriod"]   = Request["EndPeriod"];
                }
                else
                {
                    this.Session["ErrorInfor"] = "没有费用期间,请联系管理员";
                    Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
                }
                if (Request["ExpenseSubCategoryID"] != null)
                {
                    this.ViewState["ExpenseSubCategoryID"] = Request["ExpenseSubCategoryID"];
                }
                else
                {
                    this.Session["ErrorInfor"] = "未找到费用小类,请联系管理员";
                    Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
                }

                this.BeginPeriodCtl.Text        = DateTime.Parse(this.ViewState["BeginPeriod"].ToString()).ToString("yyyy-MM");
                this.EndPeriodCtl.Text          = DateTime.Parse(this.ViewState["EndPeriod"].ToString()).ToString("yyyy-MM");
                this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(int.Parse(this.ViewState["ExpenseSubCategoryID"].ToString()));
                ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(int.Parse(this.ViewState["CustomerID"].ToString()));
                this.CustomerNameCtl.Text = customer.CustomerName;
                //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName;
                this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString();
            }
            //判断费用期间是否正确
            MasterDataBLL bll = new MasterDataBLL();
            if (!bll.IsValidApplyYear(DateTime.Parse(this.ViewState["BeginPeriod"].ToString()).AddMonths(-3).Year))
            {
                this.SubmitBtn.Visible = false;
                PageUtility.ShowModelDlg(this, "不允许申请本财年项目,请联系财务部!");
                return;
            }

            //预算信息
            decimal[] calculateAssistant = new decimal[14];
            calculateAssistant                = new BudgetBLL().GetSalesBudgetByParameter(int.Parse(this.ViewState["CustomerID"].ToString()), DateTime.Parse(this.ViewState["BeginPeriod"].ToString()), int.Parse(this.ViewState["ExpenseSubCategoryID"].ToString()));
            this.CustomerBudgetCtl.Text       = calculateAssistant[0].ToString("N");
            this.CustomerBudgetRemainCtl.Text = calculateAssistant[5].ToString("N");
            this.OUBudgetCtl.Text             = calculateAssistant[7].ToString("N");
            this.OUApprovedAmountCtl.Text     = calculateAssistant[8].ToString("N");
            this.OUApprovingAmountCtl.Text    = calculateAssistant[9].ToString("N");
            this.OUCompletedAmountCtl.Text    = calculateAssistant[10].ToString("N");
            this.OUReimbursedAmountCtl.Text   = calculateAssistant[11].ToString("N");
            this.OUBudgetRemainCtl.Text       = calculateAssistant[12].ToString("N");
            this.OUBudgetRateCtl.Text         = ((decimal)(calculateAssistant[13] * 100)).ToString("N") + "%";

            if (Session["ProxyStuffUserId"] != null)
            {
                this.SubmitBtn.Visible = false;
            }
        }
        // 打开明细表
        FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter();
        int      customerID = int.Parse(this.ViewState["CustomerID"].ToString());
        DateTime period     = DateTime.Parse(this.ViewState["BeginPeriod"].ToString());

        taDetail.FillDataFromRebate(this.InnerDS.FormApplyDetailView, customerID, period.Year, period.Month);
        //隐藏预算信息
        this.OUBudgetCtl.Text           = "";
        this.OUApprovedAmountCtl.Text   = "";
        this.OUApprovingAmountCtl.Text  = "";
        this.OUCompletedAmountCtl.Text  = "";
        this.OUReimbursedAmountCtl.Text = "";
        this.OUBudgetRemainCtl.Text     = "";
        this.OUBudgetRateCtl.Text       = "";
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        if (!this.IsPostBack) {
            PageUtility.SetContentTitle(this.Page, "��������");
            this.Page.Title = "��������";

            // �û���Ϣ��ְλ��Ϣ
            AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
            AuthorizationDS.PositionRow rowUserPosition = (AuthorizationDS.PositionRow)Session["Position"];
            this.ViewState["StuffUserID"] = stuffUser.StuffUserId;
            this.ViewState["PositionID"] = rowUserPosition.PositionId;
            this.ViewState["FlowTemplate"] = new AuthorizationBLL().GetFlowTemplate((int)SystemEnums.BusinessUseCase.FormApply, stuffUser.StuffUserId);

            this.StuffNameCtl.Text = stuffUser.StuffName;
            this.PositionNameCtl.Text = rowUserPosition.PositionName;
            this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowUserPosition.OrganizationUnitId).OrganizationUnitName;
            this.ViewState["DepartmentID"] = rowUserPosition.OrganizationUnitId;
            this.AttendDateCtl.Text = stuffUser.AttendDate.ToShortDateString();

            if (this.Request["RejectObjectID"] != null) {
                this.ViewState["RejectedObjectID"] = int.Parse(this.Request["RejectObjectID"].ToString());

            }
            //����Dzݸ���и�ֵ
            if (Request["ObjectId"] != null) {
                this.ViewState["ObjectId"] = int.Parse(Request["ObjectId"]);
                if (this.Request["RejectObjectID"] == null) {
                    this.DeleteBtn.Visible = true;
                } else {
                    this.DeleteBtn.Visible = false;
                }
                OpenForm(int.Parse(this.ViewState["ObjectId"].ToString()));
            } else {
                this.DeleteBtn.Visible = false;
                if (Request["CustomerID"] != null) {
                    this.ViewState["CustomerID"] = Request["CustomerID"];
                } else {
                    this.Session["ErrorInfor"] = "δ�ҵ��ͻ�������ϵ����Ա";
                    Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
                }
                if (Request["BeginPeriod"] != null && Request["EndPeriod"] != null) {
                    this.ViewState["BeginPeriod"] = Request["BeginPeriod"];
                    this.ViewState["EndPeriod"] = Request["EndPeriod"];
                } else {
                    this.Session["ErrorInfor"] = "û�з����ڼ䣬����ϵ����Ա";
                    Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
                }
                if (Request["ExpenseSubCategoryID"] != null) {
                    this.ViewState["ExpenseSubCategoryID"] = Request["ExpenseSubCategoryID"];
                } else {
                    this.Session["ErrorInfor"] = "δ�ҵ�����С�࣬����ϵ����Ա";
                    Response.Redirect("~/ErrorPage/SystemErrorPage.aspx");
                }

                this.BeginPeriodCtl.Text = DateTime.Parse(this.ViewState["BeginPeriod"].ToString()).ToString("yyyy-MM");
                this.EndPeriodCtl.Text = DateTime.Parse(this.ViewState["EndPeriod"].ToString()).ToString("yyyy-MM");
                this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(int.Parse(this.ViewState["ExpenseSubCategoryID"].ToString()));
                ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(int.Parse(this.ViewState["CustomerID"].ToString()));
                this.CustomerNameCtl.Text = customer.CustomerName;
                //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName;
                this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString();
            }
            //�жϷ����ڼ��Ƿ���ȷ
            MasterDataBLL bll = new MasterDataBLL();
            if (!bll.IsValidApplyYear(DateTime.Parse(this.ViewState["BeginPeriod"].ToString()).AddMonths(-3).Year)) {
                this.SubmitBtn.Visible = false;
                PageUtility.ShowModelDlg(this, "���������뱾������Ŀ������ϵ����!");
                return;
            }

            //Ԥ����Ϣ
            decimal[] calculateAssistant = new decimal[14];
            calculateAssistant = new BudgetBLL().GetSalesBudgetByParameter(int.Parse(this.ViewState["CustomerID"].ToString()), DateTime.Parse(this.ViewState["BeginPeriod"].ToString()), int.Parse(this.ViewState["ExpenseSubCategoryID"].ToString()));
            this.CustomerBudgetCtl.Text = calculateAssistant[0].ToString("N");
            this.CustomerBudgetRemainCtl.Text = calculateAssistant[5].ToString("N");
            this.OUBudgetCtl.Text = calculateAssistant[7].ToString("N");
            this.OUApprovedAmountCtl.Text = calculateAssistant[8].ToString("N");
            this.OUApprovingAmountCtl.Text = calculateAssistant[9].ToString("N");
            this.OUCompletedAmountCtl.Text = calculateAssistant[10].ToString("N");
            this.OUReimbursedAmountCtl.Text = calculateAssistant[11].ToString("N");
            this.OUBudgetRemainCtl.Text = calculateAssistant[12].ToString("N");
            this.OUBudgetRateCtl.Text = ((decimal)(calculateAssistant[13] * 100)).ToString("N") + "%";

            if (Session["ProxyStuffUserId"] != null) {
                this.SubmitBtn.Visible = false;
            }

        }
        // ����ϸ��
        FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter();
        int customerID = int.Parse(this.ViewState["CustomerID"].ToString());
        DateTime period = DateTime.Parse(this.ViewState["BeginPeriod"].ToString());
        taDetail.FillDataFromRebate(this.InnerDS.FormApplyDetailView, customerID, period.Year, period.Month);
        //����Ԥ����Ϣ
        this.OUBudgetCtl.Text = "";
        this.OUApprovedAmountCtl.Text = "";
        this.OUApprovingAmountCtl.Text = "";
        this.OUCompletedAmountCtl.Text = "";
        this.OUReimbursedAmountCtl.Text = "";
        this.OUBudgetRemainCtl.Text = "";
        this.OUBudgetRateCtl.Text = "";
    }
示例#4
0
    protected void OpenForm(int formID)
    {
        FormTableAdapter taForm = new FormTableAdapter();
        taForm.FillByID(this.InnerDS.Form, formID);
        FormDS.FormRow rowForm = this.InnerDS.Form[0];
        FormApplyTableAdapter taFormApply = new FormApplyTableAdapter();
        taFormApply.FillByID(this.InnerDS.FormApply, formID);
        FormDS.FormApplyRow rowFormApply = this.InnerDS.FormApply[0];
        //��ֵ
        this.ViewState["BeginPeriod"] = rowFormApply.BeginPeriod.ToShortDateString();
        this.ViewState["EndPeriod"] = rowFormApply.EndPeriod.ToShortDateString();
        this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM");
        this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM");
        this.ViewState["ExpenseSubCategoryID"] = rowFormApply.ExpenseSubCategoryID.ToString();
        this.ExpenseSubCategoryCtl.Text = new MasterDataBLL().GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID);
        this.ViewState["CustomerID"] = rowFormApply.CustomerID.ToString();
        ERS.CustomerRow customer = new MasterDataBLL().GetCustomerById(rowFormApply.CustomerID);
        this.CustomerNameCtl.Text = customer.CustomerName;
        //this.CustomerTypeCtl.Text = new MasterDataBLL().GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName;
        this.odsShop.SelectParameters["CustomerID"].DefaultValue = customer.CustomerID.ToString();

        this.ShopDDL.SelectedValue = rowFormApply.ShopID.ToString();
        this.PaymentTypeDDL.SelectedValue = rowFormApply.PaymentTypeID.ToString();
        if (!rowFormApply.IsContractNoNull()) {
            this.ContractNoCtl.Text = rowFormApply.ContractNo;
        }
        if (!rowFormApply.IsRemarkNull()) {
            this.RemarkCtl.Text = rowFormApply.Remark;
        }
        if (!rowFormApply.IsAttachedFileNameNull())
            this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName;
        if (!rowFormApply.IsRealAttachedFileNameNull())
            this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName;

        if (!rowFormApply.IsPromotionBeginDateNull()) {
            this.UCPromotionBegin.SelectedDate = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd");
        }
        if (!rowFormApply.IsPromotionEndDateNull()) {
            this.UCPromotionEnd.SelectedDate = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd");
        }
        this.PromotionScopeDDL.SelectedValue = rowFormApply.PromotionScopeID.ToString();
        this.PromotionTypeDDL.SelectedValue = rowFormApply.PromotionTypeID.ToString();
        if (!rowFormApply.IsPromotionDescNull()) {
            this.PromotionDescCtl.Text = rowFormApply.PromotionDesc;
        }
        this.ShelfTypeDDL.SelectedValue = rowFormApply.ShelfTypeID.ToString();
        if (!rowFormApply.IsFirstVolumeNull()) {
            this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString();
        }
        if (!rowFormApply.IsSecondVolumeNull()) {
            this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString();
        }
        if (!rowFormApply.IsThirdVolumeNull()) {
            this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString();
        }
        if (!rowFormApply.IsEstimatedSaleVolumeNull()) {
            this.txtEstimatedSaleVolume.Text = rowFormApply.EstimatedSaleVolume.ToString();
        }
        if (!rowFormApply.IsPackageUnitPriceNull()) {
            this.txtPackageUnitPrice.Text = rowFormApply.PackageUnitPrice.ToString("N");
        }
        if (!rowFormApply.IsFormApplyNameNull()) {
            this.txtFormApplyName.Text = rowFormApply.FormApplyName.ToString();
        }
        if (!rowFormApply.IsReimburseRequirementsNull()) {
            int ReimburseRequirement = rowFormApply.ReimburseRequirements;
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Picture) == (int)SystemEnums.ReimburseRequirements.Picture) {
                chkListReimburseRequirements.Items[0].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Agreement) == (int)SystemEnums.ReimburseRequirements.Agreement) {
                chkListReimburseRequirements.Items[1].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DeliveryOrder) == (int)SystemEnums.ReimburseRequirements.DeliveryOrder) {
                chkListReimburseRequirements.Items[2].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Contract) == (int)SystemEnums.ReimburseRequirements.Contract) {
                chkListReimburseRequirements.Items[3].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.DM) == (int)SystemEnums.ReimburseRequirements.DM) {
                chkListReimburseRequirements.Items[4].Selected = true;
            }
            if ((ReimburseRequirement & (int)SystemEnums.ReimburseRequirements.Other) == (int)SystemEnums.ReimburseRequirements.Other) {
                chkListReimburseRequirements.Items[5].Selected = true;
            }
        }
        // ����ϸ��
        FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter();
        taDetail.FillByFormID(this.InnerDS.FormApplyDetailView, formID);
        new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        if (!this.IsPostBack)
        {
            PageUtility.SetContentTitle(this.Page, "方案执行确认");
            this.Page.Title = "方案执行确认";

            int formID = int.Parse(Request["ObjectId"]);
            this.ViewState["ObjectId"] = formID;
            FormDS.FormRow      rowForm      = this.SalesApplyBLL.GetFormByID(formID)[0];
            FormDS.FormApplyRow rowFormApply = this.SalesApplyBLL.GetFormApplyByID(formID)[0];
            if (rowForm.IsProcIDNull())
            {
                ViewState["ProcID"] = "";
            }
            else
            {
                ViewState["ProcID"] = rowForm.ProcID;
            }

            ViewState["OrganizationUnitID"] = rowForm.OrganizationUnitID;
            this.FormNoCtl.Text             = rowForm.FormNo;
            this.ApplyDateCtl.Text          = rowForm.SubmitDate.ToShortDateString();
            AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID);
            this.StuffNameCtl.Text    = applicant.StuffName;
            this.PositionNameCtl.Text = new OUTreeBLL().GetPositionById(rowForm.PositionID).PositionName;
            if (new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID) != null)
            {
                this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID).OrganizationUnitName;
            }
            this.AttendDateCtl.Text  = applicant.AttendDate.ToShortDateString();
            this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM");
            this.EndPeriodCtl.Text   = rowFormApply.EndPeriod.ToString("yyyy-MM");
            MasterDataBLL masterBll = new MasterDataBLL();
            this.ExpenseSubCategoryCtl.Text = masterBll.GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID);
            ERS.CustomerRow customer = masterBll.GetCustomerById(rowFormApply.CustomerID);
            this.CustomerNameCtl.Text = customer.CustomerName;
            //this.CustomerTypeCtl.Text = masterBll.GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName;
            this.ShopNameCtl.Text    = masterBll.GetShopByID(rowFormApply.ShopID).ShopName;
            this.PaymentTypeCtl.Text = masterBll.GetPaymentTypeById(rowFormApply.PaymentTypeID).PaymentTypeName;
            if (!rowFormApply.IsContractNoNull())
            {
                this.ContractNoCtl.Text = rowFormApply.ContractNo;
            }
            this.AmountCtl.Text = rowFormApply.Amount.ToString("N");
            if (!rowFormApply.IsRemarkNull())
            {
                this.RemarkCtl.Text = rowFormApply.Remark;
            }
            if (!rowFormApply.IsAttachedFileNameNull())
            {
                this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName;
            }
            if (!rowFormApply.IsRealAttachedFileNameNull())
            {
                this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName;
            }

            if (!rowFormApply.IsPromotionBeginDateNull())
            {
                this.PromotionBeginCtl.Text = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd");
            }
            if (!rowFormApply.IsPromotionEndDateNull())
            {
                this.PromotionEndCtl.Text = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd");
            }
            this.PromotionScopeCtl.Text = masterBll.GetPromotionScopeById(rowFormApply.PromotionScopeID).PromotionScopeName;
            this.PromotionTypeCtl.Text  = masterBll.GetPromotionTypeById(rowFormApply.PromotionTypeID).PromotionTypeName;
            if (!rowFormApply.IsPromotionDescNull())
            {
                this.PromotionDescCtl.Text = rowFormApply.PromotionDesc;
            }
            this.ShelfTypeCtl.Text = masterBll.GetShelfTypeById(rowFormApply.ShelfTypeID).ShelfTypeName;
            if (!rowFormApply.IsFirstVolumeNull())
            {
                this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString();
            }
            if (!rowFormApply.IsSecondVolumeNull())
            {
                this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString();
            }
            if (!rowFormApply.IsThirdVolumeNull())
            {
                this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString();
            }
            if (!rowFormApply.IsAverageVolumeNull())
            {
                this.AverageVolumeCtl.Text = rowFormApply.AverageVolume.ToString();
            }
            if (!rowFormApply.IsEstimatedSaleVolumeNull())
            {
                this.txtEstimatedSaleVolume.Text = rowFormApply.EstimatedSaleVolume.ToString();
            }
            if (!rowFormApply.IsPackageUnitPriceNull())
            {
                this.txtPackageUnitPrice.Text = rowFormApply.PackageUnitPrice.ToString("N");
            }
            if (!rowFormApply.IsFormApplyNameNull())
            {
                this.txtFormApplyName.Text = rowFormApply.FormApplyName;
            }

            //查看预算信息按钮
            this.btnViewBudget.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesBudgetByPosition.aspx?ShowDialog=1','', 'dialogWidth:1035px;dialogHeight:660px;resizable:yes;')";

            //预算信息
            this.CustomerBudgetCtl.Text       = rowFormApply.CustomerBudget.ToString("N");
            this.CustomerBudgetRemainCtl.Text = rowFormApply.CustomerBudgetRemain.ToString("N");
            this.OUBudgetCtl.Text             = rowFormApply.OUBudget.ToString("N");
            this.OUApprovedAmountCtl.Text     = rowFormApply.OUAppovedAmount.ToString("N");
            this.OUApprovingAmountCtl.Text    = rowFormApply.OUApprovingAmount.ToString("N");
            this.OUCompletedAmountCtl.Text    = rowFormApply.OUCompletedAmount.ToString("N");
            this.OUReimbursedAmountCtl.Text   = rowFormApply.OUReimbursedAmount.ToString("N");
            this.OUBudgetRemainCtl.Text       = rowFormApply.OUBudgetRemain.ToString("N");
            this.OUBudgetRateCtl.Text         = ((decimal)(rowFormApply.OUBudgetRate * 100)).ToString("N") + "%";

            AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
            this.ViewState["StuffUserID"] = stuffUser.StuffUserId;

            //是否显示关闭按钮,如果没有执行完成的话那么不能关闭
            this.CloseBtn.Visible = false;
            if ((!rowFormApply.IsClose) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted)
            {
                if (stuffUser.StuffUserId == rowForm.UserID || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0)
                {
                    if (!rowFormApply.IsIsCompleteNull())
                    {
                        if (rowFormApply.IsComplete)
                        {
                            this.CloseBtn.Visible = true;
                        }
                    }
                }
            }

            //是否显示复制按钮
            if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted && stuffUser.StuffUserId == rowForm.UserID)
            {
                this.UCBeginPeriod.Visible = true;
                this.UCEndPeriod.Visible   = true;
                this.lblSignal.Visible     = true;
                this.CopyBtn.Visible       = true;
            }
            else
            {
                this.UCBeginPeriod.Visible = false;
                this.UCEndPeriod.Visible   = false;
                this.lblSignal.Visible     = false;
                this.CopyBtn.Visible       = false;
            }
            //是否显示打印信息
            if (((stuffUser.StuffUserId == rowForm.UserID || base.IsBusinessProxy(rowForm.UserID, rowForm.SubmitDate) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit)))
            {
                this.PrintBtn.Visible = true;
            }
            else
            {
                this.PrintBtn.Visible = false;
            }

            if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit))
            {
                this.PrintInfor.Visible = true;
                int printCount = rowFormApply.IsPrintCountNull() ? 0 : rowFormApply.PrintCount;
                this.PrintInfor.Text = "该方案已经被打印" + printCount + "次";
            }
            else
            {
                this.PrintInfor.Visible = false;
            }


            //如果是弹出,取消按钮不可见
            if (this.Request["ShowDialog"] != null)
            {
                if (this.Request["ShowDialog"].ToString() == "1")
                {
                    this.upButton.Visible   = false;
                    this.PrintInfor.Visible = false;
                    this.PrintBtn.Visible   = false;
                    this.Master.FindControl("divMenu").Visible       = false;
                    this.Master.FindControl("tbCurrentPage").Visible = false;
                }
            }
            //如果是申请人则隐藏预算信息
            if (stuffUser.StuffUserId == rowForm.UserID)
            {
                this.OUBudgetCtl.Text           = "";
                this.OUApprovedAmountCtl.Text   = "";
                this.OUApprovingAmountCtl.Text  = "";
                this.OUCompletedAmountCtl.Text  = "";
                this.OUReimbursedAmountCtl.Text = "";
                this.OUBudgetRemainCtl.Text     = "";
                this.OUBudgetRateCtl.Text       = "";
                this.btnViewBudget.Visible      = false;
            }

            //处理执行确认内容
            if (!rowFormApply.IsConfirmCompleteDateNull())
            {
                ConfirmCompleteDateCtl.Text = rowFormApply.ConfirmCompleteDate.ToString("yyyy-MM-dd");
            }
            if (!rowFormApply.IsAccruedPeriodNull())
            {
                AccruedPeriodCtl.Text = rowFormApply.AccruedPeriod.ToString("yyyy-MM");
            }
            //如果是申请人并且没有执行确认,实际费用才可以编辑
            this.ViewState["ExecuteReadOnly"] = true;
            if (!rowFormApply.IsIsCompleteNull())
            {
                if (!rowFormApply.IsComplete && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted)
                {
                    if (rowForm.UserID == stuffUser.StuffUserId || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0)
                    {
                        this.ViewState["ExecuteReadOnly"] = false;
                        this.AccrudePeriodSignal.Visible  = true;
                        this.PeriodDDL.Visible            = true;
                        this.ExecuteConfirmBtn.Visible    = true;
                        this.ExecuteCancelBtn.Visible     = true;
                    }
                }
            }
            //分摊比例
            new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID);
            if (InnerDS.FormApplySplitRate != null && InnerDS.FormApplySplitRate.Count > 0)
            {
                this.divSplitRate.Visible   = true;
                this.gvSplitRate.Visible    = true;
                this.gvSplitRate.DataSource = InnerDS.FormApplySplitRate;
                this.gvSplitRate.DataBind();
            }
        }

        //明细信息
        FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter();

        taDetail.FillByFormID(this.InnerDS.FormApplyDetailView, (int)this.ViewState["ObjectId"]);
        FormApplyExpenseDetailTableAdapter taExpense = new FormApplyExpenseDetailTableAdapter();

        taExpense.FillByFormApplyID(this.InnerDS.FormApplyExpenseDetail, (int)this.ViewState["ObjectId"]);

        this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"];
        this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        if (!this.IsPostBack) {
            PageUtility.SetContentTitle(this.Page, "����ִ��ȷ��");
            this.Page.Title = "����ִ��ȷ��";

            int formID = int.Parse(Request["ObjectId"]);
            this.ViewState["ObjectId"] = formID;
            FormDS.FormRow rowForm = this.SalesApplyBLL.GetFormByID(formID)[0];
            FormDS.FormApplyRow rowFormApply = this.SalesApplyBLL.GetFormApplyByID(formID)[0];
            if (rowForm.IsProcIDNull()) {
                ViewState["ProcID"] = "";
            } else {
                ViewState["ProcID"] = rowForm.ProcID;
            }

            ViewState["OrganizationUnitID"] = rowForm.OrganizationUnitID;
            this.FormNoCtl.Text = rowForm.FormNo;
            this.ApplyDateCtl.Text = rowForm.SubmitDate.ToShortDateString();
            AuthorizationDS.StuffUserRow applicant = new AuthorizationBLL().GetStuffUserById(rowForm.UserID);
            this.StuffNameCtl.Text = applicant.StuffName;
            this.PositionNameCtl.Text = new OUTreeBLL().GetPositionById(rowForm.PositionID).PositionName;
            if (new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID) != null) {
                this.DepartmentNameCtl.Text = new OUTreeBLL().GetOrganizationUnitById(rowForm.OrganizationUnitID).OrganizationUnitName;
            }
            this.AttendDateCtl.Text = applicant.AttendDate.ToShortDateString();
            this.BeginPeriodCtl.Text = rowFormApply.BeginPeriod.ToString("yyyy-MM");
            this.EndPeriodCtl.Text = rowFormApply.EndPeriod.ToString("yyyy-MM");
            MasterDataBLL masterBll = new MasterDataBLL();
            this.ExpenseSubCategoryCtl.Text = masterBll.GetExpenseSubCateNameById(rowFormApply.ExpenseSubCategoryID);
            ERS.CustomerRow customer = masterBll.GetCustomerById(rowFormApply.CustomerID);
            this.CustomerNameCtl.Text = customer.CustomerName;
            //this.CustomerTypeCtl.Text = masterBll.GetCustomerTypeById(customer.CustomerTypeID).CustomerTypeName;
            this.ShopNameCtl.Text = masterBll.GetShopByID(rowFormApply.ShopID).ShopName;
            this.PaymentTypeCtl.Text = masterBll.GetPaymentTypeById(rowFormApply.PaymentTypeID).PaymentTypeName;
            if (!rowFormApply.IsContractNoNull()) {
                this.ContractNoCtl.Text = rowFormApply.ContractNo;
            }
            this.AmountCtl.Text = rowFormApply.Amount.ToString("N");
            if (!rowFormApply.IsRemarkNull()) {
                this.RemarkCtl.Text = rowFormApply.Remark;
            }
            if (!rowFormApply.IsAttachedFileNameNull())
                this.UCFileUpload.AttachmentFileName = rowFormApply.AttachedFileName;
            if (!rowFormApply.IsRealAttachedFileNameNull())
                this.UCFileUpload.RealAttachmentFileName = rowFormApply.RealAttachedFileName;

            if (!rowFormApply.IsPromotionBeginDateNull()) {
                this.PromotionBeginCtl.Text = rowFormApply.PromotionBeginDate.ToString("yyyy-MM-dd");
            }
            if (!rowFormApply.IsPromotionEndDateNull()) {
                this.PromotionEndCtl.Text = rowFormApply.PromotionEndDate.ToString("yyyy-MM-dd");
            }
            this.PromotionScopeCtl.Text = masterBll.GetPromotionScopeById(rowFormApply.PromotionScopeID).PromotionScopeName;
            this.PromotionTypeCtl.Text = masterBll.GetPromotionTypeById(rowFormApply.PromotionTypeID).PromotionTypeName;
            if (!rowFormApply.IsPromotionDescNull()) {
                this.PromotionDescCtl.Text = rowFormApply.PromotionDesc;
            }
            this.ShelfTypeCtl.Text = masterBll.GetShelfTypeById(rowFormApply.ShelfTypeID).ShelfTypeName;
            if (!rowFormApply.IsFirstVolumeNull()) {
                this.FirstVolumeCtl.Text = rowFormApply.FirstVolume.ToString();
            }
            if (!rowFormApply.IsSecondVolumeNull()) {
                this.SecondVolumeCtl.Text = rowFormApply.SecondVolume.ToString();
            }
            if (!rowFormApply.IsThirdVolumeNull()) {
                this.ThirdVolumeCtl.Text = rowFormApply.ThirdVolume.ToString();
            }
            if (!rowFormApply.IsAverageVolumeNull()) {
                this.AverageVolumeCtl.Text = rowFormApply.AverageVolume.ToString();
            }
            if (!rowFormApply.IsEstimatedSaleVolumeNull()) {
                this.txtEstimatedSaleVolume.Text = rowFormApply.EstimatedSaleVolume.ToString();
            }
            if (!rowFormApply.IsPackageUnitPriceNull()) {
                this.txtPackageUnitPrice.Text = rowFormApply.PackageUnitPrice.ToString("N");
            }
            if (!rowFormApply.IsFormApplyNameNull()) {
                this.txtFormApplyName.Text = rowFormApply.FormApplyName;
            }

            //�鿴Ԥ����Ϣ��ť
            this.btnViewBudget.NavigateUrl = "javascript:window.showModalDialog('" + System.Configuration.ConfigurationManager.AppSettings["WebSiteUrl"] + "/ReportManage/SalesBudgetByPosition.aspx?ShowDialog=1','', 'dialogWidth:1035px;dialogHeight:660px;resizable:yes;')";

            //Ԥ����Ϣ
            this.CustomerBudgetCtl.Text = rowFormApply.CustomerBudget.ToString("N");
            this.CustomerBudgetRemainCtl.Text = rowFormApply.CustomerBudgetRemain.ToString("N");
            this.OUBudgetCtl.Text = rowFormApply.OUBudget.ToString("N");
            this.OUApprovedAmountCtl.Text = rowFormApply.OUAppovedAmount.ToString("N");
            this.OUApprovingAmountCtl.Text = rowFormApply.OUApprovingAmount.ToString("N");
            this.OUCompletedAmountCtl.Text = rowFormApply.OUCompletedAmount.ToString("N");
            this.OUReimbursedAmountCtl.Text = rowFormApply.OUReimbursedAmount.ToString("N");
            this.OUBudgetRemainCtl.Text = rowFormApply.OUBudgetRemain.ToString("N");
            this.OUBudgetRateCtl.Text = ((decimal)(rowFormApply.OUBudgetRate * 100)).ToString("N") + "%";

            AuthorizationDS.StuffUserRow stuffUser = (AuthorizationDS.StuffUserRow)Session["StuffUser"];
            this.ViewState["StuffUserID"] = stuffUser.StuffUserId;

            //�Ƿ���ʾ�رհ�ť,���û��ִ����ɵĻ���ô���ܹر�
            this.CloseBtn.Visible = false;
            if ((!rowFormApply.IsClose) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) {
                if (stuffUser.StuffUserId == rowForm.UserID || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0) {
                    if (!rowFormApply.IsIsCompleteNull()) {
                        if (rowFormApply.IsComplete) {
                            this.CloseBtn.Visible = true;
                        }
                    }
                }
            }

            //�Ƿ���ʾ���ư�ť
            if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted && stuffUser.StuffUserId == rowForm.UserID) {
                this.UCBeginPeriod.Visible = true;
                this.UCEndPeriod.Visible = true;
                this.lblSignal.Visible = true;
                this.CopyBtn.Visible = true;
            } else {
                this.UCBeginPeriod.Visible = false;
                this.UCEndPeriod.Visible = false;
                this.lblSignal.Visible = false;
                this.CopyBtn.Visible = false;
            }
            //�Ƿ���ʾ��ӡ��Ϣ
            if (((stuffUser.StuffUserId == rowForm.UserID || base.IsBusinessProxy(rowForm.UserID, rowForm.SubmitDate) && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit))) {
                this.PrintBtn.Visible = true;
            } else {
                this.PrintBtn.Visible = false;
            }

            if (rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted || (rowForm.StatusID == (int)SystemEnums.FormStatus.Scrap && rowFormApply.IsAutoSplit)) {
                this.PrintInfor.Visible = true;
                int printCount = rowFormApply.IsPrintCountNull() ? 0 : rowFormApply.PrintCount;
                this.PrintInfor.Text = "�÷����Ѿ�����ӡ" + printCount + "��";
            } else {
                this.PrintInfor.Visible = false;
            }

            //����ǵ���,ȡ����ť���ɼ�
            if (this.Request["ShowDialog"] != null) {
                if (this.Request["ShowDialog"].ToString() == "1") {
                    this.upButton.Visible = false;
                    this.PrintInfor.Visible = false;
                    this.PrintBtn.Visible = false;
                    this.Master.FindControl("divMenu").Visible = false;
                    this.Master.FindControl("tbCurrentPage").Visible = false;
                }
            }
            //�����������������Ԥ����Ϣ
            if (stuffUser.StuffUserId == rowForm.UserID) {
                this.OUBudgetCtl.Text = "";
                this.OUApprovedAmountCtl.Text = "";
                this.OUApprovingAmountCtl.Text = "";
                this.OUCompletedAmountCtl.Text = "";
                this.OUReimbursedAmountCtl.Text = "";
                this.OUBudgetRemainCtl.Text = "";
                this.OUBudgetRateCtl.Text = "";
                this.btnViewBudget.Visible = false;
            }

            //����ִ��ȷ������
            if (!rowFormApply.IsConfirmCompleteDateNull()) {
                ConfirmCompleteDateCtl.Text = rowFormApply.ConfirmCompleteDate.ToString("yyyy-MM-dd");
            }
            if (!rowFormApply.IsAccruedPeriodNull()) {
                AccruedPeriodCtl.Text = rowFormApply.AccruedPeriod.ToString("yyyy-MM");
            }
            //����������˲���û��ִ��ȷ�ϣ�ʵ�ʷ��òſ��Ա༭
            this.ViewState["ExecuteReadOnly"] = true;
            if (!rowFormApply.IsIsCompleteNull()) {
                if (!rowFormApply.IsComplete && rowForm.StatusID == (int)SystemEnums.FormStatus.ApproveCompleted) {
                    if (rowForm.UserID == stuffUser.StuffUserId || new MasterDataBLL().GetProxyReimburseByParameter(rowForm.UserID, stuffUser.StuffUserId, rowForm.SubmitDate).Count > 0) {
                        this.ViewState["ExecuteReadOnly"] = false;
                        this.AccrudePeriodSignal.Visible = true;
                        this.PeriodDDL.Visible = true;
                        this.ExecuteConfirmBtn.Visible = true;
                        this.ExecuteCancelBtn.Visible = true;
                    }
                }
            }
            //��̯����
            new FormApplySplitRateTableAdapter().FillByApplyID(InnerDS.FormApplySplitRate, formID);
            if (InnerDS.FormApplySplitRate != null && InnerDS.FormApplySplitRate.Count > 0) {
                this.divSplitRate.Visible = true;
                this.gvSplitRate.Visible = true;
                this.gvSplitRate.DataSource = InnerDS.FormApplySplitRate;
                this.gvSplitRate.DataBind();
            }
        }

        //��ϸ��Ϣ
        FormApplyDetailViewTableAdapter taDetail = new FormApplyDetailViewTableAdapter();
        taDetail.FillByFormID(this.InnerDS.FormApplyDetailView, (int)this.ViewState["ObjectId"]);
        FormApplyExpenseDetailTableAdapter taExpense = new FormApplyExpenseDetailTableAdapter();
        taExpense.FillByFormApplyID(this.InnerDS.FormApplyExpenseDetail, (int)this.ViewState["ObjectId"]);

        this.cwfAppCheck.FormID = (int)this.ViewState["ObjectId"];
        this.cwfAppCheck.ProcID = this.ViewState["ProcID"].ToString();
    }