Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-3-8"))
                {
                    selectID  = HTTPRequest.GetInt("aid", 0);
                    bDate     = Convert.ToDateTime(HTTPRequest.GetString("bDate"));
                    eDate     = Convert.ToDateTime(HTTPRequest.GetString("eDate"));
                    className = HTTPRequest.GetString("className");
                    kID       = HTTPRequest.GetInt("kID", 0);
                    //判断是否有子节点
                    bool tl = DataClass.ExistsFeesSubjectClassChild(Convert.ToInt32(kID));
                    if (tl)
                    {
                        dataclass = CostDetails.getTreeChildrenCount(kID.ToString());
                        string[] dclass = dataclass.Split(',');
                        for (int j = 0; j < dclass.Length - 1; j++)
                        {
                            cList = CostDetails.getCostOfClassDetails(selectID, bDate, eDate, Convert.ToInt32(dclass[j].ToString()));

                            DataTable rt = cList.Copy();
                            rt.TableName = "o_" + j + c_count;
                            rDateSet.Tables.Add(rt);
                            c_count = c_count + 1;
                        }
                    }
                    else
                    {
                        cList = CostDetails.getCostOfClassDetails(selectID, bDate, eDate, kID);

                        DataTable rt = cList.Copy();
                        rt.TableName = "o_" + c_count;
                        rDateSet.Tables.Add(rt);
                        c_count = c_count + 1;
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }