private void FetchData()
        {
            SqlDataSource sqlDataSource = new SqlDataSource(cs, "spSelectActiveProjects");

            sqlDataSource.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
            Projects.DataSource             = sqlDataSource;
            Projects.DataBind();
        }
Exemplo n.º 2
0
        private void FillTable()
        {
            SqlDataSource sqlDataSource = new SqlDataSource(cs, "spSelectClientsActivities");

            sqlDataSource.SelectCommandType = SqlDataSourceCommandType.StoredProcedure;
            sqlDataSource.SelectParameters.Add("ClientID", DbType.Int32, client.IDClient.ToString());
            Projects.DataSource = sqlDataSource;
            Projects.DataBind();
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ConnectionClass.OpenConnection();
            ViewProjects vp = new ViewProjects();

            dt = vp.ViewAllProjects((string)Session["uID"]);
            dt.Columns.Add("TimeAgo", typeof(string));
            foreach (DataRow dr in dt.Rows)
            {
                dr["TimeAgo"] = Agile_2018.Time.TimeAgo(DateTime.Parse(dr["DateCreated"].ToString()));
            }
            Projects.DataSource = dt;
            Projects.DataBind();
        }
Exemplo n.º 4
0
    public void ViewProjects(object sender, EventArgs e)
    {
        if (Session["Username"] == null)
        {
            return;
        }
        string        connStr = ConfigurationManager.ConnectionStrings["iwork"].ToString();
        SqlConnection conn    = new SqlConnection(connStr);

        SqlCommand cmd = new SqlCommand("getProject", conn);

        cmd.CommandType = CommandType.StoredProcedure;

        cmd.Parameters.Add(new SqlParameter("@username", Session["Username"].ToString()));

        SqlDataAdapter sda = new SqlDataAdapter(cmd);
        DataTable      dt  = new DataTable();

        sda.Fill(dt);
        Projects.DataSource = dt;
        Projects.DataBind();
    }