Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] == null || string.IsNullOrWhiteSpace(Session["UserID"].ToString()))
            {
                Response.Redirect("~/Account/Login.aspx");
            }

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

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

            if (!IsPostBack)
            {
                SqlDataSource1.SelectParameters["年份"].DefaultValue = DateTime.Now.Year.ToString();
                DropDownListWork.DataBind();
                //TextBoxSchedule.Text = @"3月:沟通台商和青房意见,加快启动筹备;
//                4月 - 5月:台方进入青岛,项目开办公司成立。
//6月:确定业态、主题定位、设计方案,招商签约发包。
//7 - 8月:青房完成综合验收,具备交付条件。双方就租赁面积等合作细节、装修等达成一致。
//9 - 10月:签订合同,启动装修,研究税收扶持政策。
//11月:落实燃气管道、扶梯、货梯等物业条件。
//12月:围绕文创、休闲、旅游、美食、购物等招商。
//";
            }
        }
Beispiel #2
0
        //protected Core.Tools t;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] == null || string.IsNullOrWhiteSpace(Session["UserID"].ToString()))
            {
                Response.Redirect("~/Account/Login.aspx");
            }

            mc = new ManageClass();
            //t = new Core.Tools();
            uc = new UserClass();
            wc = new WorkClass();

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

            if (!IsPostBack)
            {
                SqlDataSource1.SelectParameters["年份"].DefaultValue = DateTime.Now.Year.ToString();
                DropDownListWork.DataBind();
            }

            //protected void Button1_Click(object sender, EventArgs e)
            //{
            //    //Response.Write("yy");
            //}
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                GridView1.DataBind();
            }

            //t = new Core.Tools();
            mc = new ManageClass();
        }
Beispiel #4
0
        //protected Core.AddScheduleClass asc;
        protected void Page_Load(object sender, EventArgs e)
        {
            //t = new Core.Tools();
            mc = new ManageClass();
            //ss = new ShowSchedule();
            //asc = new AddScheduleClass();
            sc = new ScheduleClass();
            wc = new WorkClass();

            if (!IsPostBack)
            {
                //Repeater1.Visible = false;
                DataBind();
            }
        }
    //生成員工=============================================================================================
    void CreateEmployee()
    {
        //生成經理(ID 姓名 能力 薪水 僱用費用 自我介紹 僱用狀態 出勤狀態 工作地點)
        Manage [0] = new ManageClass(0, "沃特‧巴特", 1, 460000, 0, "雇用人之前,你需要確認三項素質:誠實,聰明,活力。但是最重要的是誠實。", true, true, 0);
        Manage [1] = new ManageClass(1, "彼得·薩奇", 2, 789000, 1654700, "當市場下跌時,你輕易的將好東西打折變賣,但是一旦市場向上,再想買回來,難之又難。", true, false, 1);
        Manage [2] = new ManageClass(2, "寶迪·鄧普頓", 2, 1180000, 2141000, "我可以靠著學生時期賣愛心筆的經驗,適時的給予幫助。", false, false, 1);
        Manage [3] = new ManageClass(3, "班傑明·格嵐費姆", 2, 1680000, 4300000, "我不認識一個叫富蘭克林的人,但我認識隔壁賣奶茶的妹子。", false, false, 1);
        Manage [4] = new ManageClass(4, "喬治·威盛頓", 3, 3468000, 6570000, "成功在優點的發揮,失敗是缺點的累積,我覺得是廢話。", false, false, 1);
        Manage [5] = new ManageClass(5, "約翰‧醒夫", 3, 5689000, 9672000, "沒有口水與汗水,就只能去喝早餐店的紅茶。", false, false, 1);
        Manage [6] = new ManageClass(6, "狂古·博格爾", 4, 9897000, 13400000, "做好手中事,珍惜眼前人。", false, false, 1);
        Manage [7] = new ManageClass(7, "麥爾遜‧威斯", 4, 14200000, 35550000, "我只能說:問君能有幾多愁,睏了累了喝蠻牛。", false, false, 1);
        Manage [8] = new ManageClass(8, "朱利亞‧迪伯遜", 4, 32640000, 50000000, "老闆我喜歡交朋友,尤其是女朋友。", false, false, 1);
        Manage [9] = new ManageClass(9, "馬克·墨比普斯", 5, 56970000, 84000000, "少說多做,句句都會得到別人的重視;多說少做,句句都會受到別人的忽視。", false, false, 1);
        //生成警衛(ID 姓名 能力 薪水 僱用費用 自我介紹 僱用狀態 出勤狀態 工作地點)
        Security[0] = new SecurityClass(0, "傑克·邱爾", 1, 236000, 0, "爭吵的時候,男人和女人的區別就像步槍和機關槍的區別。", true, true, 0);
        Security[1] = new SecurityClass(1, "馬汀‧尼格", 1, 452100, 84900, "寒冷到了極致時,太陽就要光臨。", true, false, 1);
        Security[2] = new SecurityClass(2, "黃浦興", 2, 553210, 98000, "不怕虎一樣的敵人,就怕豬一樣的隊友。", false, false, 1);
        Security[3] = new SecurityClass(3, "李自白", 2, 804320, 134520, "成功是一種觀念,致富是一種義務,快樂是一種權力。", false, false, 1);
        Security[4] = new SecurityClass(4, "趙永昌", 3, 1300000, 179500, "老闆,錢對你來說真的就那麼重要嗎?講了三個多小時了一分錢都不降?", false, false, 1);
        Security[5] = new SecurityClass(5, "關漢壽", 3, 1850000, 253000, "強者向人們揭示的是確認人生的價值,弱者向人們揭示的卻是對人生的懷疑。", false, false, 1);
        Security[6] = new SecurityClass(6, "克雷·哈森", 3, 3240000, 324000, "我要是做了人事部經理,第一件事就是提拔自己做老總。", false, false, 1);
        Security[7] = new SecurityClass(7, "羅·福爾", 4, 4685000, 495100, "超乎一切之上的一件事,就是保持青春朝氣。", false, false, 1);
        Security[8] = new SecurityClass(8, "馬克·科爾", 4, 5239600, 541000, "廢話是人際關係的第一句。", false, false, 1);
        Security[9] = new SecurityClass(9, "羅剎", 5, 8745000, 785100, "每一個成功者都有一個開始。勇於開始,才能找到成功。", false, false, 1);
        //生成顧問(ID 姓名 能力 薪水 僱用費用 自我介紹 僱用狀態 出勤狀態 工作地點 烹飪 音樂 科技 機工 金融)
        Consultant[0] = new ConsultantClass(0, "貝果", 1, 230000, 0, "逆風的方向更適合飛翔,我不怕千萬人阻擋只怕自己投降。", true, false, 3, 1, 1, 0, 1);
        Consultant[1] = new ConsultantClass(1, "米其輪", 1, 280000, 0, "世界上那些最容易的事情中,拖延時間最不費力。", true, false, 2, 2, 2, 0, 1);
        Consultant[2] = new ConsultantClass(2, "弗朗索瓦", 1, 370000, 0, "每天晚上疲憊地坐到椅子上時,才覺得真真切切地過了一天。", true, false, 1, 3, 1, 0, 1);
        Consultant[3] = new ConsultantClass(3, "幔酘", 1, 450000, 1555555, "成功不是將來才有的,而是從決定去做的那一刻起,持續累積而成。", false, false, 3, 1, 1, 0, 0);
        Consultant[4] = new ConsultantClass(4, "布里茲", 2, 680000, 1974100, "用腦思考,用心琢磨,用行動證實。", false, false, 3, 2, 1, 0, 1);
        Consultant[5] = new ConsultantClass(5, "阿瑪迪斯", 2, 860000, 2841000, "工作的最高境界就是看著別人上班,領著別人的工資。", false, false, 1, 3, 1, 1, 1);
        Consultant[6] = new ConsultantClass(6, "塞巴斯蒂安", 2, 930000, 3333333, "前程四緊就是:手頭緊、眉頭緊、衣服緊、時間緊。", false, false, 2, 3, 3, 1, 1);
        Consultant[7] = new ConsultantClass(7, "費曲·博德", 2, 1700000, 3485200, "既然上了賊船,就要做個成功的海盜。", false, false, 3, 2, 0, 0, 0);
        Consultant[8] = new ConsultantClass(8, "路德維希", 3, 1954000, 4320000, "學習要加,驕傲要減,機會要乘,懶惰要除。", false, false, 1, 3, 2, 2, 1);
        Consultant[9] = new ConsultantClass(9, "威廉·G", 3, 2350000, 5100000, "唯女人與英語難過也,唯老婆與工作難找也。", false, false, 2, 2, 3, 2, 0);

        Consultant[10] = new ConsultantClass(10, "史蒂芬·J", 3, 3360000, 5505500, "人生自古誰無死,哪個拉屎不用紙!", false, false, 1, 1, 3, 1, 1);
        Consultant[11] = new ConsultantClass(11, "托瓦茲", 3, 4890000, 6484100, "積極思考造成積極人生,消極思考造成消極人生。", false, false, 2, 1, 3, 0, 0);
        Consultant[12] = new ConsultantClass(12, "恰配克", 3, 6300000, 8940100, "微笑是我們心靈的最真誠傾訴,是在困難面前最好的良藥。", false, false, 0, 0, 1, 3, 1);
        Consultant[13] = new ConsultantClass(13, "瓦特", 3, 7056000, 14523000, "在非洲,每隔一分鐘,就有六十秒過去。", false, false, 2, 2, 2, 3, 1);
        Consultant[14] = new ConsultantClass(14, "紐克曼", 4, 8641000, 26348100, "跟你通電話的那晚,聽見了你的聲音。", false, false, 1, 2, 1, 3, 2);
        Consultant[15] = new ConsultantClass(15, "達文西", 4, 8800000, 45200000, "跟你在一起時,回憶一天前的事情,就如回想昨天的事情。", false, false, 3, 0, 2, 3, 1);
        Consultant[16] = new ConsultantClass(16, "湯普遜", 4, 9800000, 57841000, "比別人多一點志氣,你就會多一份出息。", false, false, 1, 2, 3, 0, 3);
        Consultant[17] = new ConsultantClass(17, "摩根", 5, 13200000, 63890000, "比別人多一點執著,你就會創造奇蹟。", false, false, 2, 1, 3, 3, 3);
        Consultant[18] = new ConsultantClass(18, "園潔三菱", 5, 35100000, 78400000, "月亮好美麗啊…到了這個時候,我還在工作喔!", false, false, 1, 1, 3, 3, 3);
        Consultant[19] = new ConsultantClass(19, "易中滿", 5, 68740000, 99999999, "你付的出錢請我嗎?", false, false, 3, 3, 3, 3, 3);
    }    //生成員工=============================================================================================
Beispiel #6
0
 public void OncreateSDB()
 {
     SDBinfo = new ManageClass
     {
         ClassName      = "10TT",
         SumAbsent      = 2,
         SumAbsentTrue  = 1,
         SumAbsentFalse = 1,
         SumA           = 30,
         SumB           = 5,
         SumC           = 0,
         SumD           = 0,
         SumVP          = 2,
         Sumlesson      = 35,
         SumGoodLesson  = 20
     };
 }
        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();
        }
Beispiel #8
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();
        }