示例#1
0
        private void BindData()
        {
            TaskBLL TaskBL = new TaskBLL(connectionString);
            List<TaskViewModel> tasks = TaskBL.GetTaskInventory();
            Dictionary<int, string> CarID_Name = TaskBL.GetNameListFromCarTable();
            Dictionary<int, string> EmployeeID_Name = TaskBL.GetNameListFromEmployeeTable();
            string[] date_notime = new string[3];

            foreach (TaskViewModel element in tasks)
            {
                date_notime = element.DateAssigned.Split(' ');
                element.DateAssigned = date_notime[0];

                if (!String.IsNullOrEmpty(element.DateComplete))
                {
                    date_notime = element.DateComplete.Split(' ');
                    element.DateComplete = date_notime[0];
                }
            }

            SelectCar.DataSource = CarID_Name.Values;
            SelectCar.DataBind();

            AssignedEmployee.DataSource = EmployeeID_Name.Values;
            AssignedEmployee.DataBind();

            TaskList.DataSource = tasks;
            TaskList.DataBind();
        }
示例#2
0
        public void BindList()
        {
            int ID = Convert.ToInt32(Request.QueryString["ProjectID"]);

            TaskList.DataSource = WebBLL.Tbl_ProjectDesignerManager.GetDataTableByPage(100, 1, "projectid=" + ID.ToString(), "");
            TaskList.DataBind();
        }
        public void Bind()
        {
            int ID = Convert.ToInt32(Request.QueryString["ProjectID"]);

            WebModels.Tbl_Project project = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(ID);
            this.ProjectName.Value = project.ProjectName;
            this.ProjectNo.Value   = project.ProjectNo;
            TaskList.DataSource    = WebBLL.Tbl_ProjectDesignerManager.GetDataTableByPage(0, 5, "ProjectID=" + ID, "");
            TaskList.DataBind();
        }
示例#4
0
        protected void BindList()
        {
            string WhereStr = "Status='任务审批' and nodeuser='******' and ProjectID=" + ProjectName.SelectedValue + " and className1='" + this.ClassName.SelectedValue + "'";
            int    count    = WebBLL.Tbl_DesignTaskManager.GetDataTableByCount(WhereStr);

            if (count > 0)
            {
                TaskList.DataSource = WebBLL.Tbl_DesignTaskManager.GetDataTableByPage(200, 1, WhereStr, "");
                TaskList.DataBind();
            }
            else
            {
                TaskList.DataSource = "";
                TaskList.DataBind();
            }
        }
示例#5
0
        protected void BindList()
        {
            string WhereStr = "ProjectID=" + ProjectName.SelectedValue + " and className1='" + this.ClassName1.SelectedValue + "'";
            int    count    = WebBLL.Tbl_DesignTaskManager.GetDataTableByCount(WhereStr);

            if (count > 0)
            {
                TaskList.DataSource = WebBLL.Tbl_DesignTaskManager.GetDataTableByPage(200, 1, WhereStr, "dt_tuhao asc,dt_xuhao asc");
                TaskList.DataBind();
            }
            else
            {
                TaskList.DataSource = "";
                TaskList.DataBind();
            }
        }
示例#6
0
        protected void BindList()
        {
            string WhereStr = "ClassName1='" + ClassName1.SelectedItem.Text + "' and ClassName2='" + this.ClassName2.SelectedItem.Text + "'";
            int    count    = WebBLL.Tbl_DesignVolumeManager.GetDataTableByCount(WhereStr);

            if (count > 0)
            {
                TaskList.DataSource = WebBLL.Tbl_DesignVolumeManager.GetDataTableByPage(200, 1, WhereStr, "VolumeNo asc");
                TaskList.DataBind();
            }
            else
            {
                TaskList.DataSource = "";
                TaskList.DataBind();
            }
        }
示例#7
0
        protected void Page_Init(object sender, EventArgs e)
        {
            if (!Request.GetUser().Browse)
            {
                Response.StatusCode = 401;
                return;
            }
            var info = new FileInfo(logPath = FileHelper.GetDataPath("error.log"));

            LogSize = Mygod.Helper.GetSize(info.Exists ? info.Length : 0);
            var tasks = Directory.EnumerateFiles(Server.MapPath("~/Data"), "*.task")
                        .Select(path => GeneralTask.Create(Path.GetFileNameWithoutExtension(path))).Where(task => task != null)
                        .OrderBy(task => task.Status).ThenByDescending(task => task.StartTime).ToList();

            TaskList.DataSource = tasks;
            TaskList.DataBind();
            TaskCount = tasks.Count;
        }
    protected void TaskComments_Click(object sender, EventArgs e)
    {
        divComment.Visible    = true;
        divAddTask.Visible    = false;
        divAddComment.Visible = false;


        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["LoginConnectionString"].ConnectionString);

        con.Open();
        String         test = "select Description from ProjectTask where ProjectName='" + Session["project"] + "'";
        SqlCommand     com  = new SqlCommand(test, con);
        SqlDataAdapter da   = new SqlDataAdapter(com);
        DataSet        ds   = new DataSet();

        da.Fill(ds);                                                             // fill dataset
        TaskList.DataTextField = ds.Tables[0].Columns["Description"].ToString(); // text field name of table dispalyed in dropdown
        /*ProjectList.DataValueField = ds.Tables[0].Columns["id"].ToString();             // to retrive specific  textfield name */
        TaskList.DataSource = ds.Tables[0];                                      //assigning datasource to the dropdownlist
        TaskList.DataBind();
        con.Close();
    }
 private void PopulateList()
 {
     TaskList.DataSource = GetDisplay();
     TaskList.DataBind();
 }