protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         StepManager SM   = new StepManager();
         int         id   = Convert.ToInt32(Request["id"]);
         StepTBx     step = SM.GetByID(id);
         step.status = -1;
         SM.Save();
         Response.Write(JsonConvert.SerializeObject(new { success = 1 }));
     }
     catch (Exception ex)
     {
         Response.Write(JsonConvert.SerializeObject(new { success = -1,
                                                          error   = ex }));
     }
 }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            StepManager SM   = new StepManager();
            StepTBx     step = new StepTBx();


            step.status = 1;
            step.effect = Request["effect"];

            StepTBx temp = SM.GetbyStepnumber(int.Parse(Request["number"]));
            if (temp != null)
            {
                Response.Write(JsonConvert.SerializeObject(new
                {
                    success = 0,
                    error   = "Step was has Effect"
                }));
                return;
            }
            step.step_number = int.Parse(Request["number"]);
            SM.Add(step);
            Response.Write(JsonConvert.SerializeObject(new
            {
                success = 1
            }));
        }
        catch (Exception ex)
        {
            Response.Write(JsonConvert.SerializeObject(new
            {
                success = -1,
                error   = ex
            }));
        }
    }
 partial void DeleteStepTBx(StepTBx instance);
 partial void UpdateStepTBx(StepTBx instance);
 partial void InsertStepTBx(StepTBx instance);
Beispiel #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        StepManager SM = new StepManager();

        step = SM.GetByID(Convert.ToInt32(Request.QueryString["id"]));
    }
Beispiel #7
0
 public void Add(StepTBx user)
 {
     DB.StepTBxes.InsertOnSubmit(user);
     DB.SubmitChanges();
 }