public List <EmployeesReportsModel> LKU_Employees_Reports_Active_ByBrh_Type_Freq(string brh, string typ, string frq)
        {
            List <EmployeesReportsModel> lst = new List <EmployeesReportsModel>();

            SqlCommand    cmd = new SqlCommand();
            SqlDataReader rdr = default(SqlDataReader);

            SqlConnection conn = new SqlConnection(STRATIXDataConnString);

            using (conn)
            {
                conn.Open();

                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "RPT_LKU_proc_Employees_Reports_Active_ByBrh_Type_Freq";
                cmd.Connection  = conn;

                AddParamToSQLCmd(cmd, "@brh", SqlDbType.VarChar, 2, ParameterDirection.Input, brh);
                AddParamToSQLCmd(cmd, "@type", SqlDbType.VarChar, 2, ParameterDirection.Input, typ);
                AddParamToSQLCmd(cmd, "@freq", SqlDbType.VarChar, 2, ParameterDirection.Input, frq);

                rdr = cmd.ExecuteReader();

                using (rdr)
                {
                    while (rdr.Read())
                    {
                        EmployeesReportsModel r = new EmployeesReportsModel();

                        r.rptID    = (int)rdr["RptID"];
                        r.email    = (string)rdr["EmpEmail"];
                        r.name     = (string)rdr["RptName"];
                        r.temppath = (string)rdr["RptTempPath"];
                        r.rootpath = (string)rdr["RptRootPath"];
                        r.filename = (string)rdr["RptFileName"];
                        r.fullpath = (string)rdr["RptFullPath"];
                        r.frq      = (string)rdr["RptFreq"];
                        r.typ      = (string)rdr["RptType"];

                        lst.Add(r);
                    }
                }
            }
            return(lst);
        }
示例#2
0
        public List <EmployeesReportsModel> Get_Emp_Reports(string name)
        {
            List <EmployeesReportsModel> lst = new List <EmployeesReportsModel>();

            SqlCommand    cmd = new SqlCommand();
            SqlDataReader rdr = default(SqlDataReader);

            SqlConnection conn = new SqlConnection(STRATIXDataConnString);

            using (conn)
            {
                conn.Open();

                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "RPT_LKU_proc_Emails_ByRptName";
                cmd.Connection  = conn;

                AddParamToSQLCmd(cmd, "@name", SqlDbType.VarChar, 25, ParameterDirection.Input, name);

                rdr = cmd.ExecuteReader();

                using (rdr)
                {
                    while (rdr.Read())
                    {
                        EmployeesReportsModel r = new EmployeesReportsModel();

                        r.rptID    = (int)rdr["RptID"];
                        r.email    = (string)rdr["EmpEmail"];
                        r.temppath = (string)rdr["RptTempPath"];
                        r.rootpath = (string)rdr["RptRootPath"];
                        r.filename = (string)rdr["RptFileName"];
                        r.fullpath = (string)rdr["RptFullPath"];

                        lst.Add(r);
                    }
                }
            }

            return(lst);
        }
示例#3
0
        public List <EmployeesReportsModel> LKU_Employees_Reports_Active()
        {
            List <EmployeesReportsModel> lst = new List <EmployeesReportsModel>();

            SqlCommand    cmd = new SqlCommand();
            SqlDataReader rdr = default(SqlDataReader);

            SqlConnection conn = new SqlConnection(STRATIXDataConnString);

            using (conn)
            {
                conn.Open();

                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "RPT_LKU_proc_Employees_Reports_Active";
                cmd.Connection  = conn;

                rdr = cmd.ExecuteReader();

                using (rdr)
                {
                    while (rdr.Read())
                    {
                        EmployeesReportsModel r = new EmployeesReportsModel();

                        r.rptID    = (int)rdr["RptID"];
                        r.email    = (string)rdr["EmpEmail"];
                        r.name     = (string)rdr["RptName"];
                        r.rootpath = (string)rdr["RptRootPath"];
                        r.filename = (string)rdr["RptFileName"];
                        r.fullpath = (string)rdr["RptFullPath"];
                        r.freq     = (string)rdr["RptFreq"];

                        lst.Add(r);
                    }
                }
            }
            return(lst);
        }