Example #1
0
 //分承担部门按项目
 private List <FundInformation> FindByAcceptUnit()
 {
     page = 2;
     gd_UnitAPeople.PageIndex = 0;
     if (ttb_Work.Text.Trim() == "")
     {
         List <int>             ProjectID = blpro.FindIDlistByAU(tbAgency.Text.Trim(), Convert.ToInt32(Session["SecrecyLevel"]));
         List <FundInformation> lis       = new List <FundInformation>();
         for (int i = 0; i < ProjectID.Count; i++)
         {
             lis.AddRange(blfund.FindByPO(ProjectID[i], "提取", Convert.ToInt32(Session["SecrecyLevel"])));
         }
         return(lis);
     }
     else
     {
         int projectid = blpro.SelectProjectID(ttb_Work.Text.Trim());
         if (projectid == 0)
         {
             Alert.ShowInTop("未找到此项目名,请检查!");
             ttb_Work.Text = "";
             return(null);
         }
         else
         {
             Common.Entities.Project pro = blpro.FindProject(projectid, Convert.ToInt32(Session["SecrecyLevel"])).FirstOrDefault();
             if (pro.AcceptUnit != tbAgency.Text.Trim())
             {
                 string str = "此项目由" + pro.AcceptUnit + " 承接!请重新输入!";
                 Alert.ShowInTop(str);
                 return(null);
             }
             else
             {
                 List <FundInformation> list = blfund.FindByPO(projectid, "提取", Convert.ToInt32(Session["SecrecyLevel"]));
                 return(list);
             }
         }
     }
 }
Example #2
0
        //分承担部门按项目
        private void FindByag(List <int> proid)
        {
            page = 2;
            gd_MoneyGive.PageIndex = 0;
            List <FundInformation> fundlist = new List <FundInformation>();
            List <int>             proID    = new List <int>();

            if (proid.Count != 0)
            {
                for (int i = 0; i < proid.Count; i++)
                {
                    Common.Entities.Project pro = blpro.FindProject(proid[i], Convert.ToInt32(Session["SecrecyLevel"])).FirstOrDefault();
                    string name = pro.AcceptUnit;
                    if (name == ddl_Unit.SelectedText.Trim())
                    {
                        proID.Add(proid[i]);
                    }
                }
                for (int i = 0; i < proID.Count; i++)
                {
                    fundlist.AddRange(fund.FindByAPO(proID[i], "支出", Convert.ToInt32(Session["SecrecyLevel"])));
                }
            }
            else
            {
                // int id = blag.SelectAgencyID();
                List <int> ProjectIDList = blpro.FindIDlistByAU(ddl_Unit.SelectedText.Trim(), Convert.ToInt32(Session["SecrecyLevel"]));
                for (int i = 0; i < ProjectIDList.Count; i++)
                {
                    fundlist.AddRange(fund.FindByAPO(ProjectIDList[i], "支出", Convert.ToInt32(Session["SecrecyLevel"])));
                }
            }
            gd_MoneyGive.RecordCount = fundlist.Count;
            gd_MoneyGive.DataSource  = fundlist;
            gd_MoneyGive.DataBind();
        }