Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.userid > 0)
            {
                if (CheckUserPopedoms("X") || CheckUserPopedoms("7-2-3-8"))
                {
                    storesID = HTTPRequest.GetInt("sid", 0);
                    selectID = HTTPRequest.GetInt("aid", 0);
                    bDate    = Convert.ToDateTime(HTTPRequest.GetString("bDate"));
                    eDate    = Convert.ToDateTime(HTTPRequest.GetString("eDate"));
                    sName    = HTTPRequest.GetString("sName");
                    sType    = HTTPRequest.GetString("sType");

                    kList = HTTPRequest.GetString("kID");
                    string[] kList_Arrary = kList.Split(',');
                    for (int i = 0; i < kList_Arrary.Length - 1; i++)
                    {
                        //判断是否有子节点
                        bool tl = DataClass.ExistsFeesSubjectClassChild(Convert.ToInt32(kList_Arrary[i]));
                        if (tl)
                        {
                            dataclass = CostDetails.getTreeChildrenCount(kList_Arrary[i]);
                            string[] dclass = dataclass.Split(',');
                            for (int j = 0; j < dclass.Length - 1; j++)
                            {
                                sList = CostDetails.getCostOfStorehouseDetails(selectID, storesID, dclass[j].ToString(), bDate, eDate);
                                DataTable dt = sList.Copy();
                                dt.TableName = "p" + j + c_count;
                                sDateSet.Tables.Add(dt);
                                c_count++;
                            }
                        }
                        else
                        {
                            sList = CostDetails.getCostOfStorehouseDetails(selectID, storesID, kList_Arrary[i], bDate, eDate);
                            DataTable dt = sList.Copy();
                            dt.TableName = "f" + i + c_count;
                            sDateSet.Tables.Add(dt);
                            c_count++;
                        }
                    }
                }
                else
                {
                    AddErrLine("权限不足!");
                }
            }
            else
            {
                AddErrLine("请先登录!");
                SetBackLink("login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
                SetMetaRefresh(1, "login.aspx?referer=" + Utils.UrlEncode(Utils.GetUrlReferrer()));
            }
        }