Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataSet ds = new DataAccess.Para_JobType().GetList("JobTypeParent is NULL");
         foreach (DataRow dr in ds.Tables[0].Rows)
         {
             jobSelect.Items.Add(new ListItem(dr["JobName"].ToString(), dr["JobTypeID"].ToString()));
         }
     }
 }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string    jobType = context.Request.Form["jobType"];
            DataTable dt      = new DataAccess.Para_JobType().GetList("JobTypeParent='" + jobType + "'").Tables[0];

            dt.TableName = "business";
            DataSet ds = new DataSet();

            ds.Tables.Add(dt.Copy());
            string json = JsonConvert.SerializeObject(ds);

            context.Response.Write(json);
        }