コード例 #1
0
        public int Savedata(string EmpName)
        {
            db dbcon = new WcfServiceLibrary1.db();

            dbcon.save(EmpName);

            return(1);
        }
コード例 #2
0
        List <Employee> IService1.GetData()
        {
            List <Employee> EmpList = new List <Employee>();
            db        dbcon         = new WcfServiceLibrary1.db();
            DataTable dt;

            dt = dbcon.GetDetails();

            EmpList = (from DataRow dr in dt.Rows
                       select new Employee()
            {
                Id = Convert.ToInt32(dr["Id"]),
                EmpName = dr["EmpName"].ToString()
            }).ToList();

            return(EmpList);
        }