예제 #1
0
        public IEnumerable <CN> getSubCNtype(string input)
        {
            SqlConnection getsub = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Second"].ConnectionString);

            getsub.Open();
            List <CN> subdata = new List <CN>();
            string    con     = " ";

            con = "select dropcode,[desc] from gdexpdb.oms.parameter where category = '" + input + "' and status = '1' and dropcode <> '0206'";
            SqlCommand command = new SqlCommand(con, getsub);

            using (SqlDataReader read1 = command.ExecuteReader())
            {
                while (read1.Read())
                {
                    CN dataforsub = new CN();
                    dataforsub.desc     = read1["desc"].ToString();
                    dataforsub.dropcode = read1["dropcode"].ToString();
                    subdata.Add(dataforsub);
                }
            }
            getsub.Close();
            return(subdata);
        }
예제 #2
0
        public IEnumerable <CN> getCNtype()
        {
            SqlConnection getCN = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["Second"].ConnectionString);

            getCN.Open();
            List <CN> CNsend = new List <CN>();
            string    d      = " ";

            d = "select dropcode,[desc] from gdexpdb.oms.parameter where category = 'TypeAcct' and status = '1' and dropcode NOT in ('01','04')";
            SqlCommand connect = new SqlCommand(d, getCN);

            using (SqlDataReader read = connect.ExecuteReader())
            {
                while (read.Read())
                {
                    CN getcnread = new CN();
                    getcnread.desc     = read["desc"].ToString();
                    getcnread.dropcode = read["dropcode"].ToString();
                    CNsend.Add(getcnread);
                }
            }
            getCN.Close();
            return(CNsend);
        }