Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            t    = new Core.Test();
            sc   = new ScheduleClass();
            tool = new Core.Tools();
            wc   = new WorkClass();
            //if (!IsPostBack)
            //    PreLoadData();
            //Response.Write(existMonths.Count);
            //Response.Write("<br/>" +existMonths[Guid.Parse("e121878e-1615-e811-82f1-b083fe979874")]);
            //Response.Write(ss.GetMonthScheduleDetail(Guid.Parse("c521878e-1615-e811-82f1-b083fe979874"), 9));
            //t.OnlyTest();
            //DataTable dt = t.DealMonthSchedule();
            //foreach (DataRow dr in dt.Rows)
            //    Response.Write(dr[0] + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + dr[1] + "<br>");

            //Response.Write(System.IO.File.Exists(Server.MapPath(@"\App_Data\目标节点.txt")));
            //string s = "xxxx";
            //Response.Write((s => int.Parse(s)));

            //string s = "拜泉路6月份完工通车。 清江支路清江之路丰华地块3月份签订收地协议, 4月份完成清江之路丰华地块收地.后续施工根据收地情况开展";
            //string st = Regex.Match(s, @"\d*月").Value;
            //Response.Write(st);

            //for (int i = 3; i <= 6; i++)
            //    Response.Write(i + "<br>");
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tableName = "重点工作2018";
            t         = new Core.Tools();


            //t.BuildTempMonthTable();

            //t.BuildMonthSchedule();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //BuildWeek();
            Core.Tools t = new Core.Tools();
            //t.BuildWeekOfYear(DateTime.Now.Year);

            for (int i = 1; i <= 12; i++)
            {
                Response.Write(i + "月" + t.GetWeekCountOfMonth(DateTime.Now.Year, i) + "个周<br>");
            }
            Response.Write("执行成功");
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tool = new Core.Tools();
            sc   = new ScheduleClass();
            wc   = new WorkClass();
            PreLoadData();

            //if (!IsPostBack)
            //{
            Repeater1.DataBind();
            //    ViewState["repeater"] = Repeater1.ItemTemplate;
            //}
            //else
            //    Repeater1.ItemTemplate = (ITemplate )ViewState["repeater"];
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session["UserID"] = 11;

            if (Session["UserID"] == null || string.IsNullOrWhiteSpace(Session["UserID"].ToString()))
            {
                Response.Redirect("~/Account/Login.aspx");
            }

            tool = new Core.Tools();
            sc   = new ScheduleClass();
            wc   = new WorkClass();

            category = 0;

            if (IsPostBack)
            {
                weeksOfMonth = (int[])ViewState["weeksOfMonth"];
                allWorkID    = (Guid[])ViewState["allWorkID"];
                existMonths  = (Dictionary <Guid, int[]>)ViewState["existMonths"];
                existWeeks   = (Dictionary <Guid, Dictionary <int, int> >)ViewState["existWeeks"];
                //projectCategoryLocationID = ViewState["projectCategoryLocationID"] as Guid[];
                projectCategoryLocationSN = ViewState["projectCategoryLocationSN"] as int[];
                categoryName = ViewState["categoryName"] as string[];
                //SqlDataSource1.SelectCommand = Filter.SelectedValue;
            }
            else
            {
                PreLoadData();
            }

            SqlDataSource1.SelectParameters["year"].DefaultValue = tool.year.ToString();

            SqlDataSource1.SelectCommand = Filter.SelectedValue;
            //SqlDataSource1.DataBind();
            //SqlDataSource1.SelectCommand = (RepeaterSchedule.Controls[0].FindControl("Filter") as DropDownList).SelectedValue;

            //RepeaterSchedule.DataBind();
            DataBind();

            //Response.Write((RepeaterSchedule.Controls[0].FindControl("Filter") as DropDownList).SelectedValue);
            //    ViewState["repeater"] = Repeater1.ItemTemplate;
            //}
            //else
            //    Repeater1.ItemTemplate = (ITemplate )ViewState["repeater"];
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Session["UserID"] = 11;

            if (Session["UserID"] == null || string.IsNullOrWhiteSpace(Session["UserID"].ToString()))
            {
                Response.Redirect("~/Account/Login.aspx");
            }

            tool = new Core.Tools();
            sc   = new ScheduleClass();
            wc   = new WorkClass();
            mc   = new ManageClass();
            uc   = new UserClass();

            if (uc.GetUserType(int.Parse(Session["UserID"].ToString())) != 1)
            {
                Response.Redirect("~/Account/Login.aspx");
            }

            category = 0;

            if (IsPostBack)
            {
                weeksOfMonth = (int[])ViewState["weeksOfMonth"];
                allWorkID    = (Guid[])ViewState["allWorkID"];
                existMonths  = (Dictionary <Guid, int[]>)ViewState["existMonths"];
                existWeeks   = (Dictionary <Guid, Dictionary <int, int> >)ViewState["existWeeks"];
                projectCategoryLocationID = ViewState["projectCategoryLocationID"] as Guid[];
                categoryName = ViewState["categoryName"] as string[];
            }
            else
            {
                PreLoadData();
            }

            SqlDataSource1.SelectParameters["year"].DefaultValue = tool.year.ToString();
            //SqlDataSource1.DataBind();

            RepeaterSchedule.DataBind();
        }
Exemple #7
0
        //public Core.AddScheduleClass asc;
        protected void Page_Load(object sender, EventArgs e)
        {
            tool = new Core.Tools();
            sc   = new ScheduleClass();
            wc   = new WorkClass();
            mc   = new ManageClass();
            //asc = new AddScheduleClass();


            //Session["UserID"] = 12;

            //if (Request.QueryString["id"] != null)
            //    Session["UserID"] = Request.QueryString["UserID"];

            if (Session["UserID"] == null || string.IsNullOrWhiteSpace(Session["UserID"].ToString()))
            {
                Response.Redirect("~/default.aspx");
            }

            userID = int.Parse(Session["UserID"].ToString());

            if (IsPostBack)
            {
                weeksOfMonth = (int[])ViewState["weeksOfMonth"];
                userWorkID   = (Guid[])ViewState["userWorkID"];
                existMonths  = (Dictionary <Guid, int[]>)ViewState["existMonths"];
                existWeeks   = (Dictionary <Guid, Dictionary <int, int> >)ViewState["existWeeks"];
                editedWorkID = ViewState["editedWorkID"] as List <Guid>;
            }
            else
            {
                PreLoadData();
            }

            SqlDataSource1.SelectParameters["year"].DefaultValue = tool.year.ToString();
            RepeaterSchedule.DataBind();
        }