예제 #1
0
    public static GreenForm GetGreenForm(string id)
    {
        SqlParameter parameter = new SqlParameter("@studentID", id);

        DataSet ds = db.GetDataSetByQuery("GetGreenForm", System.Data.CommandType.StoredProcedure, parameter);

        DataRow dr = ds.Tables[0].Rows[0];

        GreenForm green = new GreenForm();

        green.StudentId      = dr[1].ToString();
        green.ProductionDate = dr[2].ToString();
        green.Doctor         = dr[3].ToString();
        green.Eyes           = dr[4].ToString();
        green.Theory         = dr[5].ToString();
        green.Img            = dr[6].ToString();

        return(green);
    }
예제 #2
0
 public void UpdateGreenForm(string id, string produce, string doctor, string eyes, string theory, string img)
 {
     GreenForm.Update(id, produce, doctor, eyes, theory, img);
 }
예제 #3
0
    public string GetGreenForm(string id)
    {
        JavaScriptSerializer j = new JavaScriptSerializer();

        return(j.Serialize(GreenForm.GetGreenForm(id)));
    }