コード例 #1
0
        public static ENTVWPRJPROJECTTASKRESOURCE GetValueTaskResourse(Guid ID)//Id getiriyorum detaildaki labellara yazdırmak için
        {
            con = SQL.GetConnection();
            cmd = SQL.SetCommand("SELECT * FROM VW_PRJ_ProjectTaskResource WHERE ID=@ID", con);
            cmd.Parameters.AddWithValue("@ID", ID);

            con.Open();
            SqlDataReader dr = cmd.ExecuteReader();
            ENTVWPRJPROJECTTASKRESOURCE ptskrsrs = null;
            byte?Duration = null;

            while (dr.Read())
            {
                if (!string.IsNullOrEmpty(dr["DURATION"].ToString()))
                {
                    Duration = Convert.ToByte(dr["DURATION"].ToString());
                }
                ptskrsrs = new ENTVWPRJPROJECTTASKRESOURCE(Guid.Parse(dr["ID"].ToString()), Guid.Parse(dr["PROJECTTASKID"].ToString()), Guid.Parse(dr["USERID"].ToString()), byte.Parse(dr["TYPEPROJECTRESOURSESTATUSID"].ToString()), Duration, dr["PROJECTTASKNAME"].ToString(), Convert.ToDateTime(dr["PROJECTTASKCREATEDATE"].ToString()), dr["USERFULLNAME"].ToString(), dr["TYPEPROJECTRESOURSESTATUSNAME"].ToString());
                break;
            }
            con.Close();
            return(ptskrsrs);
        }
コード例 #2
0
        public static List <ENTVWPRJPROJECTTASKRESOURCE> GetAllListProjectsTaskResourse(Guid PROJECTTASKID)//Verileri listeliyoruz.
        {
            con = SQL.GetConnection();
            cmd = SQL.SetCommand("SELECT * FROM VW_PRJ_ProjectTaskResource WHERE PROJECTTASKID=@PROJECTTASKID", con);
            cmd.Parameters.AddWithValue("@PROJECTTASKID", PROJECTTASKID);
            con.Open();
            SqlDataReader dr = cmd.ExecuteReader();
            ENTVWPRJPROJECTTASKRESOURCE tskrsrs = null;
            byte?duration = null;
            List <ENTVWPRJPROJECTTASKRESOURCE> ptskrsrlist = new List <ENTVWPRJPROJECTTASKRESOURCE>();

            while (dr.Read())
            {
                if (!string.IsNullOrEmpty(dr["DURATION"].ToString()))
                {
                    duration = Convert.ToByte(dr["DURATION"].ToString());
                }
                tskrsrs = new ENTVWPRJPROJECTTASKRESOURCE(Guid.Parse(dr["ID"].ToString()), Guid.Parse(dr["PROJECTTASKID"].ToString()), Guid.Parse(dr["USERID"].ToString()), byte.Parse(dr["TYPEPROJECTRESOURSESTATUSID"].ToString()), duration, dr["PROJECTTASKNAME"].ToString(), Convert.ToDateTime(dr["PROJECTTASKCREATEDATE"].ToString()), dr["USERFULLNAME"].ToString(), dr["TYPEPROJECTRESOURSESTATUSNAME"].ToString());
                ptskrsrlist.Add(tskrsrs);
            }
            con.Close();

            return(ptskrsrlist);
        }