其实我们都寂寞

我们唯一可以做的 就是看着时光流逝 风华不再 物是人非

  • 2009-05-09

    人生小记 - [心情]

    又睡了一天 没日没夜的。。

    很奇怪有时会总睡不着 有时会总睡不醒 所以每天其实就在半睡半醒中这么一天天度过

    小时候我们没有时间概念,嫌时间过得太慢,我们还没长大

    大一些后我们开始一年一年的数日子,然而不知不觉就变成了按月数,而现在来了香港,我觉得我变成了按日子来数。或许香港人都是这样,每一天都有很多的工作要做,那么今天被我睡过去了,真的要说阿弥陀佛了。。

    今天看了 玛丽与我 有些感动 只是因为又看到了那种情调,感叹我们唯一可以做的,就是看着时光流逝,风华不再,物是人非。

    珍惜每一天 每一个小时 每一秒。。珍惜每一个身边的人。

    人生,消散得太容易。

  • 2009-05-04

    小型task系统 - [c#]

    DAL

    public static TaskEntity ReturnTaskDetail(TaskEntity task)
            {
                SqlParameter[] Parms = null;
                int taid = task.TaskId;
                string cmdText = " SELECT SubTask_table.subtask_id,Goods_table.goods_name,SubTask_table.subtask_quantity,SubTask_table.subtask_mark,SubTask_table.subtask_beyond_mark,SubTask_table.subtask_max_mark "
                                        + "FROM SubTask_table INNER JOIN Goods_table "
                                        + "ON "
                                        + "(SubTask_table.goods_id = Goods_table.goods_id) "
                                        + "WHERE "
                                        + "( task_id =  '" + taid + "')";
                CommandType cmdType = CommandType.Text;

                SqlDataReader sdr = SqlHelper.returnDataReader(cmdText, cmdType, Parms);
                IList<SubTaskEntity> content = new List<SubTaskEntity>();
                while (sdr.Read())
                {
                    SubTaskEntity subtask = new SubTaskEntity();
                    subtask.SubtaskId = Convert.ToInt32(sdr["subtask_id"].ToString().Trim());
                    subtask.SubtaskGoods = sdr["goods_name"].ToString().Trim();
                    subtask.SubtaskQuantity = Convert.ToInt32(sdr["subtask_quantity"].ToString().Trim());
                    subtask.SubtaskMark = Convert.ToInt32(sdr["subtask_mark"].ToString().Trim());
                    subtask.SubtaskBeyondMark = Convert.ToInt32(sdr["subtask_beyond_mark"].ToString().Trim());
                    subtask.SubtaskMaxMark = Convert.ToInt32(sdr["subtask_max_mark"].ToString().Trim());
                    content.Add(subtask);
                }
                task.TaskContent = content;

                int taskid = task.TaskId;
                cmdText = "SELECT * FROM Task_table WHERE task_id = '" + taskid + "'";
                sdr = SqlHelper.returnDataReader(cmdText, cmdType, Parms);
                while (sdr.Read())
                {
                    task.TaskName = sdr["task_name"].ToString().Trim();
                    task.TaskStartDate = Convert.ToDateTime(sdr["task_start_date"].ToString().Trim());
                    task.TaskDeadLine = Convert.ToDateTime(sdr["task_deadline"].ToString().Trim());
                    task.TaskIntroduction = sdr["task_introduction"].ToString().Trim();
                }
                return task;
            }

     

    TaskEntity
            private int _taskid;
            private string _taskname;
            private DateTime _taskstartdate;
            private DateTime _taskdeadline;
            private IList<SubTaskEntity> _taskcontent;
            private string _taskintroduction;

    SubTaskEntity
            private int _subtaskid;
            private string _subtaskgoods;
            private int _taskid;
            private int _subtaskquantity;
            private int _subtaskmark;
            private int _subtaskbeyondmark;
            private int _subtaskmaxmark;

     

     

    ITaskView taskHandle = ViTaskFactoryHandle.taskInstance();
                    Label lab = (Label)e.Item.FindControl("Label4");
                    TaskEntity task = new TaskEntity();
                    task.TaskId = Convert.ToInt32(lab.Text.Trim());
                    task = taskHandle.ReturnTaskDetail(task);
                    Label1.Text = task.TaskName;
                    Label2.Text = task.TaskStartDate.ToString();
                    Label3.Text = task.TaskDeadLine.ToString();
                    BulletedList1.Items.Clear();
                    int i = 0;
                    BulletedList1.Items.Add(new ListItem("Introduction:",i+""));
                    i++;
                    BulletedList1.Items.Add(new ListItem(task.TaskIntroduction+"", i + ""));
                    i++;
                    BulletedList1.Items.Add(new ListItem("", i + ""));
                    i++;
                    BulletedList1.Items.Add(new ListItem("", i + ""));
                    i++;
                    foreach (SubTaskEntity sub in task.TaskContent)
                    {
                        BulletedList1.Items.Add(new ListItem("Goods Name:" + sub.SubtaskGoods, i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("Quantity:" + sub.SubtaskQuantity, i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("Mark:" + sub.SubtaskMark, i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("Beyond Mark:" + sub.SubtaskBeyondMark, i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("Max Mark:" + sub.SubtaskMaxMark, i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("", i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("", i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("", i + ""));
                        i++;
                        BulletedList1.Items.Add(new ListItem("", i + ""));
                        i++;
                    }

  • 2009-05-04

    JScript cookie - [javascript]

    // 写COOIKES:

    // writeCookie("myCookie", "my name", 24);


    function writeCookie(name, value, hours)

    {

     
    var expire = "";

     
    if(hours != null)

      {

        expire
    = new Date((new Date()).getTime() + hours * 3600000);

        expire
    = "; expires=" + expire.toGMTString();

      }

      document.cookie
    = name + "=" + escape(value) + expire;

    }

    // 读COOKIES:

    // alert( readCookie("myCookie") );

    function readCookie(name)

    {

     
    var cookieValue = "";

     
    var search = name + "=";

     
    if(document.cookie.length > 0)

      {

        offset
    = document.cookie.indexOf(search);

       
    if (offset != -1)

        {

          offset
    += search.length;

          end
    = document.cookie.indexOf(";", offset);

         
    if (end == -1) end = document.cookie.length;

          cookieValue
    = unescape(document.cookie.substring(offset, end))

        }

      }

     
    return cookieValue;

    }