Exemple #1
0
        public static List <ENTVWPRJPROJECTMYTASKS> GetAllListProjects(Guid USERID)//Görevlerim alanı icin listeleme
        {
            con = SQL.GetConnection();
            cmd = SQL.SetCommand("SELECT * FROM VW_PRJ_ProjectMyTasks WHERE USERID=@USERID ORDER BY PROJECTTASKCREATEDATE ", con);
            cmd.Parameters.AddWithValue("@USERID", USERID);
            con.Open();
            SqlDataReader          dr               = cmd.ExecuteReader();
            ENTVWPRJPROJECTMYTASKS tasks            = null;
            DateTime?dueDate                        = null;
            List <ENTVWPRJPROJECTMYTASKS> taskslist = new List <ENTVWPRJPROJECTMYTASKS>();

            while (dr.Read())
            {
                dueDate = null;
                if (!string.IsNullOrEmpty(dr["PROJECTTASKDUEDATE"].ToString()))
                {
                    dueDate = Convert.ToDateTime(dr["PROJECTTASKDUEDATE"].ToString());
                }
                tasks = new ENTVWPRJPROJECTMYTASKS(Guid.Parse(dr["PROJECTTASKRESOURSEID"].ToString()), Guid.Parse(dr["USERID"].ToString()), dr["USERFULLNAME"].ToString(), Guid.Parse(dr["FIRMID"].ToString()), dr["FIRMNAME"].ToString(), Guid.Parse(dr["PROJECTID"].ToString()), dr["PROJECTNAME"].ToString(), byte.Parse(dr["TYPEPROJECTSTATUSID"].ToString()), dr["TYPEPROJECTSTATUSNAME"].ToString(), Guid.Parse(dr["PROJECTTASKID"].ToString()), dr["PROJECTTASKNAME"].ToString(), Convert.ToDateTime(dr["PROJECTTASKCREATEDATE"]), dueDate, byte.Parse(dr["TYPEPROJECTTASKSTATUSID"].ToString()), dr["TYPEPROJECTTASKSTATUSNAME"].ToString(), bool.Parse(dr["TYPEPROJECTTASKSTATUSISOPEN"].ToString()));
                taskslist.Add(tasks);
            }
            con.Close();

            return(taskslist);
        }
Exemple #2
0
        public static ENTVWPRJPROJECTMYTASKS GetActivity(Guid PROJECTTASKRESOURSEID)
        {
            con = SQL.GetConnection();
            cmd = SQL.SetCommand("SELECT * FROM VW_PRJ_ProjectMyTasks WHERE PROJECTTASKRESOURSEID=@PROJECTTASKRESOURSEID", con);
            cmd.Parameters.AddWithValue("@PROJECTTASKRESOURSEID", PROJECTTASKRESOURSEID);

            con.Open();
            SqlDataReader          dr  = cmd.ExecuteReader();
            ENTVWPRJPROJECTMYTASKS act = null;
            DateTime?dueDate           = null;

            while (dr.Read())
            {
                dueDate = null;
                if (!string.IsNullOrEmpty(dr["PROJECTTASKDUEDATE"].ToString()))
                {
                    dueDate = Convert.ToDateTime(dr["PROJECTTASKDUEDATE"].ToString());
                }
                act = new ENTVWPRJPROJECTMYTASKS(Guid.Parse(dr["PROJECTTASKRESOURSEID"].ToString()), Guid.Parse(dr["USERID"].ToString()), dr["USERFULLNAME"].ToString(), Guid.Parse(dr["FIRMID"].ToString()), dr["FIRMNAME"].ToString(), Guid.Parse(dr["PROJECTID"].ToString()), dr["PROJECTNAME"].ToString(), byte.Parse(dr["TYPEPROJECTSTATUSID"].ToString()), dr["TYPEPROJECTSTATUSNAME"].ToString(), Guid.Parse(dr["PROJECTTASKID"].ToString()), dr["PROJECTTASKNAME"].ToString(), Convert.ToDateTime(dr["PROJECTTASKCREATEDATE"]), dueDate, byte.Parse(dr["TYPEPROJECTTASKSTATUSID"].ToString()), dr["TYPEPROJECTTASKSTATUSNAME"].ToString(), bool.Parse(dr["TYPEPROJECTTASKSTATUSISOPEN"].ToString()));
            }
            con.Close();
            return(act);
        }