Exemple #1
0
 private void Loading_DataAsync()
 {
     try
     { string userID = User.Identity.Name;
       foreach (Control pControl in DataReview.Controls)
       {
           if (pControl is HtmlTextArea)
           {
               string       code = pControl.ID.Replace("Text", "");
               HtmlTextArea txt  = (HtmlTextArea)pControl;
               txt.Value = FormData.Content("Get", userID, WorkingProfile.UserRole, WorkingProfile.SchoolYear, WorkingProfile.SchoolCode, code);
           }
       }
       foreach (Control pControl in PLPlanning.Controls)
       {
           if (pControl is HtmlTextArea)
           {
               string       code = pControl.ID.Replace("Text", "");
               HtmlTextArea txt  = (HtmlTextArea)pControl;
               txt.Value = FormData.Content("Get", userID, WorkingProfile.UserRole, WorkingProfile.SchoolYear, WorkingProfile.SchoolCode, code);
           }
       }
     }
     catch (Exception ex)
     {
         var ms = ex.Message;
     }
 }
Exemple #2
0
        /// <summary>
        ///  Call method http://localhost:9517/api/PLF/?schoolYear=20182019schoolCode=0290itemCode=PLP11value=myinputtext
        ///  by provide the value the Web API will save the value to database and return save or update action result.
        /// </summary>
        /// <param name="schoolYear"></param>
        /// <param name="schoolCode"></param>
        /// <param name="itemCode"></param>
        /// <param name="value"></param>
        /// <returns>PLF Form save content and get save result back</returns>
        // GET: api/PLF/itemCode/value
        public string Get(string schoolYear, string schoolCode, string itemCode, string value)
        {
            ParameterSP0 parameter = new ParameterSP0 {
                Operate = "Content", UserID = "", UserRole = "", SchoolYear = schoolYear, SchoolCode = schoolCode, ItemCode = itemCode, Value = value
            };

            return(FormData.Content(parameter));
        }
Exemple #3
0
        /// <summary>
        ///  http://localhost:9517/api/PLF/?userID=mif&schoolYear=20182019schoolCode=0290itemCode=PLP11
        /// This is save the content to Database using POST method
        /// </summary>
        /// <param name="plfcontent">  PLF form content object </param>

        // POST: api/PLF
        public void Post(FormContent1 plfcontent)
        {
            ParameterSP0 parameter = new ParameterSP0 {
                Operate = "Content", SchoolYear = plfcontent.SchoolYear, SchoolCode = plfcontent.SchoolCode, ItemCode = plfcontent.ItemCode, Value = plfcontent.Notes
            };

            FormData.Content(parameter);
            //  FormData.Content("Content", plfcontent.Title, "", plfcontent.SchoolYear, plfcontent.SchoolCode, plfcontent.ItemCode, plfcontent.Notes);
        }
Exemple #4
0
 /// <summary>
 ///  http://localhost:9517/api/PLF/?schoolYear=20182019schoolCode=0290itemCode=PLP11value=myinputtext
 ///  by provide the value the Web API will save the value to database and return save or update action result.
 /// </summary>
 /// <param name="schoolYear"></param>
 /// <param name="schoolCode"></param>
 /// <param name="itemCode"></param>
 /// <param name="value"></param>
 /// <returns>PLF Form save content and get save result back</returns>
 // GET: api/PLF/itemCode/value
 public string Get(string schoolYear, string schoolCode, string itemCode, string value)
 {
     return(FormData.Content("Content", "", "", schoolYear, schoolCode, itemCode, value));
 }
Exemple #5
0
 /// <summary>
 /// This is save the content to Database
 /// </summary>
 /// <param name="userID"> user ID </param>
 /// <param name="schoolYear"> PLF School Year </param>
 /// <param name="schoolCode">PLF School Code </param>
 /// <param name="itemCode">PLF item Code BDA01 to BDA26, PLP11 to PLP20 </param>
 /// <param name="value"> actual item content </param>
 ///  http://localhost:9517/api/PLF/?userID=mif&schoolYear=20182019schoolCode=0290itemCode=PLP11
 // POST: api/PLF
 public void Post(string userID, string schoolYear, string schoolCode, string itemCode, string value)
 {
     FormData.Content("Content", userID, "", schoolYear, schoolCode, itemCode, value);
 }