Beispiel #1
0
        /// <summary>
        /// 专项资金切换
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void DDL_SpecialFundsID_Change(object sender, EventArgs e)
        {
            string SpecialFundsID = DDL_SpecialFundsID.SelectedValue.ToString();

            if (!SpecialFundsID.Equals(""))//如有专项资金
            {
                DataTable DT_SpecialFunds = cash_bllext.getCash_SpecialFunds();

                if (DT_SpecialFunds.Rows.Count > 0)
                {
                    DataRow[] dr = DT_SpecialFunds.Select("ID='" + DDL_SpecialFundsID.SelectedValue.ToString() + "'");
                    if (dr.Length > 0)
                    {
                        //资金总额
                        LB_total.Text = dr[0]["TotalNum"].ToString() + "元";
                        //可用资金 
                        LB_KEYong.Text = dr[0]["Balance"].ToString() + "元";
                    }
                }

                SpecialFundsOrder1.ShowList(SpecialFundsID);
                SpecialFundsOrder1.Visible = true;
            }
            else
            {
                SpecialFundsOrder1.Visible = false;
            }
        }
        /// <summary>
        /// 显示预算列表
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void LinkButton_orderlist_Click(object sender, EventArgs e)
        {
            try
            {
                string spid = ((LinkButton)sender).CommandArgument.ToString();

                SpecialFundsOrder1.ShowList(spid);
                showOrderList.Visible = true;
                showtables.Visible    = false;
            }
            catch
            {
            }
        }
Beispiel #3
0
        /// <summary>
        /// 初始化审核信息
        /// </summary>
        /// <param name="ID"></param>
        protected void ShowInitInfor(string ID)
        {
            try
            {
                Model.USER_Users user_model = (Model.USER_Users)Session["USER_Users"];
                string           groups     = "";
                if (null != user_model)
                {
                    groups = user_model.GROUPS.ToString();//用来获取当前登录人的权限ID
                }

                //显示专项资金列表
                ShowSpecialFunds();
                //显示经费指定审批人
                ShowAssignChecker();

                DataTable DT  = new DataTable();
                string    sql = " SELECT * FROM vCash_SF_Order WHERE ID='" + ID + "' ";

                DT = pageControl.doSql(sql).Tables[0];

                if (DT.Rows.Count > 0)
                {
                    //预算报告的路径
                    string BudgetList = DT.Rows[0]["BudgetList"].ToString();

                    //预算申请名称
                    string Name = DT.Rows[0]["NAMES"].ToString();
                    //增加提示字样 by guanzhq on 2012年3月19日
                    //LB_Name.Text = "<a href='" + BudgetList + "' target='_blank'>" + Name + "</a>";
                    LB_Name.Text = "<a href='" + BudgetList + "' target='_blank'>" + Name + "(点击下载)" + "</a>";

                    //所属项目
                    string ProjectID = DT.Rows[0]["ProjectID"].ToString();
                    if (ProjectID.Equals("9999"))
                    {
                        LB_Project.Text = "暂无所属项目";
                    }
                    else
                    {
                        if (null != DT.Rows[0]["ProjectName"] && !DT.Rows[0]["ProjectName"].ToString().Equals(""))
                        {
                            LB_Project.Text = DT.Rows[0]["ProjectName"].ToString();
                        }
                        else
                        {
                            LB_Project.Text = "无";
                        }
                    }

                    //预算金额
                    string BudgetAmount = DT.Rows[0]["BudgetAmount"].ToString();
                    string Amount       = BudgetAmount;
                    //预算金额单位
                    string BAUNIT = DT.Rows[0]["BAUNIT"].ToString();
                    //实际确认预算金额
                    if (null != DT.Rows[0]["ActualAmount"] && !DT.Rows[0]["ActualAmount"].ToString().Equals(""))
                    {
                        Amount = DT.Rows[0]["ActualAmount"].ToString();
                    }

                    LB_BudgetAmount.Text = Amount + " " + BAUNIT;

                    //预算申报时间 
                    LB_AddTime.Text = Convert.ToDateTime(DT.Rows[0]["ADDTIME"].ToString()).ToString("yyyy-MM-dd HH:mm");

                    //备注信息
                    Overviews.Value = DT.Rows[0]["TEMP2"].ToString();

                    //*****申报审核信息

                    //确认预算金额
                    if (null != DT.Rows[0]["ActualAmount"] && !DT.Rows[0]["ActualAmount"].ToString().Equals(""))
                    {
                        TB_ActualAmount.Text = DT.Rows[0]["ActualAmount"].ToString();
                    }

                    //预算金额单位
                    if (null != DT.Rows[0]["AAUNIT"] && !DT.Rows[0]["AAUNIT"].ToString().Equals(""))
                    {
                        RB_AAUNIT.SelectedValue = DT.Rows[0]["AAUNIT"].ToString().Equals("元") ? "0" : "1";
                    }
                    //专项资金
                    if (null != DT.Rows[0]["SpecialFundsID"] && !DT.Rows[0]["SpecialFundsID"].ToString().Equals(""))
                    {
                        DDL_SpecialFundsID.SelectedValue = DT.Rows[0]["SpecialFundsID"].ToString();
                    }
                    //指定经费审批人
                    if (null != DT.Rows[0]["AssignChecker"] && !DT.Rows[0]["AssignChecker"].ToString().Equals(""))
                    {
                        DDL_AssignChecker.SelectedValue = DT.Rows[0]["AssignChecker"].ToString();
                    }

                    //string Status = DT.Rows[0]["Status"].ToString();
                    //if (Status.Equals("0") && !DT.Rows[0]["CheckerHistory"].ToString().Equals(""))//说明至少审过一次了,并有下一审核人
                    //{
                    //    //审批结果
                    //    RBL_check.Items.FindByValue(Status).Selected = true;

                    //    DDL_Checker.Visible = true;

                    //    DDL_Checker.SelectedValue = DT.Rows[0]["Checker"].ToString();
                    //}
                    //else if (Status.Equals("1"))    //审批通过说明是
                    //{
                    //    RBL_check.Items.FindByValue("1").Selected = true;
                    //    RBL_Checker.Items.FindByValue(Status).Selected = true;
                    //    RBL_check.Enabled = false;
                    //    RBL_Checker.Enabled = false;
                    //}
                    //else
                    //{
                    //    RBL_check.Items.FindByValue("1").Selected = true;
                    //    DDL_Checker.Visible = false;
                    //}


                    //陈雨  2012年7月20日12:16:07 修改
                    if (groups.IndexOf("20120507141002be1a2329-8f71-4c8c-ac5b-d018f8411bfb") > -1)//判断用户的权限里面有没有  财务   若有  则是室主任  若无则是分管领导
                    {
                        RBL_check.Enabled = false;
                        RBL_check.Items.FindByValue("1").Selected = true;
                        DDL_Checker.Visible       = true;
                        DDL_Checker.SelectedValue = DT.Rows[0]["Checker"].ToString();
                    }
                    else
                    {
                        RBL_check.Enabled = false;
                        RBL_check.Items.FindByValue("0").Selected = true;
                        DDL_Checker.Visible = false;
                    }


                    //显示专项资金的基本信息
                    if (!DDL_SpecialFundsID.SelectedValue.ToString().Equals(""))
                    {
                        DataTable DT_SpecialFunds = cash_bllext.getCash_SpecialFunds();

                        if (DT_SpecialFunds.Rows.Count > 0)
                        {
                            DataRow[] dr = DT_SpecialFunds.Select("ID='" + DDL_SpecialFundsID.SelectedValue.ToString() + "'");
                            if (dr.Length > 0)
                            {
                                //资金总额
                                LB_total.Text = dr[0]["TotalNum"].ToString() + "元";
                                //可用资金 
                                LB_KEYong.Text = dr[0]["Balance"].ToString() + "元";
                            }
                            else
                            {
                                //资金总额
                                LB_total.Text = "0元";
                                //可用资金 
                                LB_KEYong.Text = "0元";
                            }
                        }

                        SpecialFundsOrder1.ShowList(DDL_SpecialFundsID.SelectedValue.ToString());
                    }
                    else
                    {
                        SpecialFundsOrder1.Visible = false;
                    }
                }
            }
            catch
            { }
        }