Exemplo n.º 1
0
 protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e)
 {
     CoreLibrary.Category.Controller ccontroller = new CoreLibrary.Category.Controller();
     int idCategory = int.Parse(ddlCategory.SelectedValue.ToString());
     if (idCategory > 0)
     {
         Category EntCategory = ccontroller.GetByID(idCategory);
         EntTicket.Category = EntCategory;
         EntTicket.AssignedTo = EntCategory.AssignedTo;
         tbxAssignedTo.Text = EntCategory.AssignedTo.UserCompleteName;
     }
 }
Exemplo n.º 2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     CoreLibrary.Category.Controller ccontroller = new CoreLibrary.Category.Controller();
     Controller tcontroller = new Controller();
     int idCategory = int.Parse(ddlCategory.SelectedValue.ToString());
     GetDataFromForm();
     if (tcontroller.Save(EntTicket))
     {
         int IdTicket = tcontroller.GetLastID();
         Category EntCategory = ccontroller.GetByID(idCategory);
         Ticket lastTicket =tcontroller.SelectByID(IdTicket);
         TicketOpenSendMail(EntCategory, lastTicket);
         Response.Redirect("Default.aspx");
     }
 }
Exemplo n.º 3
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     CoreLibrary.Category.Controller ccontroller = new CoreLibrary.Category.Controller();
     Controller tcontroller = new Controller();
     int idCategory = int.Parse(ddlCategory.SelectedValue.ToString());
     GetDataFromForm();
     int ilResult = tcontroller.Save(EntTicket);
     if (ilResult != -1)
     {
         EntTicket.IdTicket = ilResult;
         //int IdTicket = tcontroller.GetLastID();
         Category EntCategory = ccontroller.GetByID(idCategory);
         //Ticket lastTicket =tcontroller.SelectByID(IdTicket);
         TicketOpenSendMail(EntCategory, EntTicket);
         Response.Redirect("Default.aspx");
     }
     else
     {
         lblError.Visible = true;
         lblError.Text = "Error al guardar la información";
     }
 }