/*
        Metodo que se utiliza para hacer una insercion de un nuevo proceso
        */
        private void saveAuxiliar()
        {
            if (ProductText.SelectedItem != null)
            {
                if (ProcessText.Text != "" & ProductText.SelectedItem.Value != "")
                {

                    ProcessService processService = new ProcessService();
                    ProcessInsertView insertView = new ProcessInsertView();

                    insertView.ProcessName = ProcessText.Text;
                    insertView.ProductLineId = Int32.Parse(ProductText.SelectedItem.Value);
                    insertView.ProcessParameterSet = parameterSetText.Items[0].Selected;
                    insertView.ProcessPlotEnable = plotEnableText.Items[0].Selected;

                    String user = Context.User.Identity.Name;

                    AuditDataFromWeb audit = new AuditDataFromWeb();
                    audit.Reason = "N/A";
                    audit.StationIP = General.getIp(this.Page);
                    audit.UserName = user;

                    CUDView crud = processService.insertProcess(insertView, audit);

                    if (crud.insert == false)
                    {
                        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Could not insert the Process')", true);
                    }
                    else
                    {
                        clearFields();
                        fillProcessTable();
                    }

                }
                else
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please complete all fields.')", true);
                }
            }
            else
            {
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please complete all fields.')", true);
            }
        }
        private void saveAuxiliar()
        {
            if (ProductText.SelectedItem != null)
            {
                if (ProcessText.Text != "" & ProductText.SelectedItem.Value != "")
                {
                    string confirmValue = Request.Form["confirm_value"];
                    if (confirmValue == "Yes")
                    {
                        ProcessService processService = new ProcessService();
                        ProcessInsertView insertView = new ProcessInsertView();

                        insertView.ProcessName = ProcessText.Text;
                        insertView.ProductLineId = Int32.Parse(ProductText.SelectedItem.Value);
                        insertView.ProcessParameterSet = parameterSetText.Items[0].Selected;
                        insertView.ProcessPlotEnable = plotEnableText.Items[0].Selected;

                        CUDView crud = processService.insertProcess(insertView);

                        if (crud.insert == false)
                        {
                            this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Could not insert the Process')", true);
                        }
                        else
                        {
                            clearFields();
                            fillProcessTable();
                        }
                    }
                }
                else
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please complete all fields.')", true);
                }
            }
            else
            {
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please complete all fields.')", true);
            }
        }