Show() public method

public Show ( ) : void
return void
    protected void SaveModelAs(object sender, EventArgs e)
    {
        if (DbUse.InRunProcess(userDir))
        {
            Master.ShowErrorMessage("Cannot save the model because calculations are still running. Please wait.");
            return;
        }
        hdnNewNameMode.Value = SaveMode.CURRENT_MODEL.ToString();

        string modelName = Master.GetCurrentModel();

        if (modelName == null || modelName.Equals("") || modelName.Equals("none"))
        {
            string message = "Cannot save the model because no model is loaded.";
            Master.ShowErrorMessage(message);
        }
        else if (IsWhatifMode())
        {
            Master.SetFocus2(btnGoToWhatif.ClientID);
            modalGoToWhatif.Show();
        }
        else
        {
            TextBox txtNewName = pnlNewModelPopup.FindControl(InputPageControls.TXT_NEW_NAME) as TextBox;
            txtNewName.Text = modelName;
            lblNewName.Text = "Save current model as: ";
            extenderNewModel.Show();
            Master.SetFocus(txtNewName.ClientID);
        }
    }
Exemplo n.º 2
0
        protected void btnAgregaNuevo_Click(object sender, EventArgs e)
        {
            try
            {
                AjaxControlToolkit.ModalPopupExtender extNuevaOpcionCatalogo = new AjaxControlToolkit.ModalPopupExtender();
                Label       lblTitulo    = new Label();
                Label       lblMensaje   = new Label();
                TextBox     txtNombOpc   = new TextBox();
                HiddenField hfAccion     = new HiddenField();
                HiddenField hfIdCatalogo = new HiddenField();

                extNuevaOpcionCatalogo = ((AjaxControlToolkit.ModalPopupExtender)ctrlOpcionCat.FindControl("mpeOpcionCatalogo"));
                lblTitulo          = ((Label)ctrlOpcionCat.FindControl("Titulo"));
                hfAccion           = ((HiddenField)ctrlOpcionCat.FindControl("Accion"));
                hfIdCatalogo       = ((HiddenField)ctrlOpcionCat.FindControl("IdCatalogo"));
                txtNombOpc         = ((TextBox)ctrlOpcionCat.FindControl("txtNomOpcCat"));
                txtNombOpc.Text    = string.Empty;
                hfAccion.Value     = "1";
                hfIdCatalogo.Value = hdnIdCatalogo.Value;
                lblTitulo.Text     = "NUEVA OPCIÓN CATALOGO";

                RadPanelItem item = acModules.FindItemByValue(hfIdCatalogo.Value);
                item.Expanded = true;

                extNuevaOpcionCatalogo.Show();
            }
            catch (Exception ex)
            {
                EncuestasMoviles.Clases.Error.ManejadorErrores(ex, Session["UserName"].ToString(), Session["UserDomain"].ToString(), Session["userMachineName"].ToString(), Session["UserIP"].ToString(), "frmCatalogos", int.Parse(Session["numeroUsuario"].ToString()));
            }
        }
Exemplo n.º 3
0
 public static void ClientMessage(Page p, string caption, string message)
 {
     if (null == p.Master)
     {
         DisplayMessage(p, message);
     }
     else
     {
         Label _lblClientMessage_ = p.Master.FindControl("_lblClientMessage_") as Label;
         Label _lblCaption_       = p.Master.FindControl("_lblCaption_") as Label;
         if (String.IsNullOrEmpty(caption))
         {
             _lblCaption_.Text = "Error";
         }
         else
         {
             _lblCaption_.Text = caption;
         }
         _lblClientMessage_.Text = message;
         UpdatePanel upd = p.Master.FindControl("_updClientMessage_") as UpdatePanel;
         upd.Update();
         AjaxControlToolkit.ModalPopupExtender extender = p.Master.FindControl("mdlPopup") as AjaxControlToolkit.ModalPopupExtender;
         extender.Show();
     }
 }
Exemplo n.º 4
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     try
     {
         LinqToSqlDataContext dataCtxt = new LinqToSqlDataContext();
         string installerName          = installerCompanyName.Text.Trim().ToLower();
         string postCode = txtPostCode.Text.Trim().ToLower();
         List <GetInstallersByNameOrPostCodeResult> installerQry = dataCtxt.GetInstallersByNameOrPostCode(installerName, postCode, Convert.ToInt32(Session[enumSessions.ARC_Id.ToString()])).ToList();
         var listCount = installerQry.Count();
         if (listCount > 0)
         {
             rptInstallerCompanies.DataSource = installerQry;
             rptInstallerCompanies.DataBind();
             lblErrorMessage.Text = string.Empty;
         }
         else
         {
             rptInstallerCompanies.DataSource = null;
             rptInstallerCompanies.DataBind();
             string script = "alertify.alert('" + ltrNoMatch.Text + "');";
             ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "alert", script, true);
         }
         AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
         if (mpInstaller != null)
         {
             mpInstaller.Show();
         }
     }
     catch (Exception objException)
     {
         CSLOrderingARCBAL.LinqToSqlDataContext db;
         db = new CSLOrderingARCBAL.LinqToSqlDataContext();
         db.USP_SaveErrorDetails(Request.Url.ToString(), ((System.Reflection.MemberInfo)(objException.TargetSite)).Name, Convert.ToString(objException.Message), Convert.ToString(objException.InnerException), Convert.ToString(objException.StackTrace), "", HttpContext.Current.Request.UserHostAddress, false, Convert.ToString(HttpContext.Current.Session[enumSessions.User_Id.ToString()]));
     }
 }
Exemplo n.º 5
0
        protected void btnModificaCatalogo_Click(object sender, EventArgs e)
        {
            try
            {
                string IdCatalogo   = hdnIdCatalogo.Value;
                string DescCatalogo = hdnDescCatalogo.Value;

                AjaxControlToolkit.ModalPopupExtender extNewCatalogo = new AjaxControlToolkit.ModalPopupExtender();
                Label       lblTitulo         = new Label();
                Label       lblMensaje        = new Label();
                TextBox     txtNombreCatalogo = new TextBox();
                HiddenField hfAccion          = new HiddenField();
                extNewCatalogo          = ((AjaxControlToolkit.ModalPopupExtender)ctrlNewCat.FindControl("mpeNewCatalogo"));
                lblTitulo               = ((Label)ctrlNewCat.FindControl("Titulo"));
                hfAccion                = ((HiddenField)ctrlNewCat.FindControl("Accion"));
                txtNombreCatalogo       = ((TextBox)ctrlNewCat.FindControl("txtNomCat"));
                hfAccion.Value          = "2";
                lblTitulo.Text          = "EDITA CATALOGO";
                txtNombreCatalogo.Text  = DescCatalogo;
                ViewState["IdCatalogo"] = IdCatalogo;
                RadPanelItem item = acModules.FindItemByValue(IdCatalogo);
                item.Expanded = true;

                extNewCatalogo.Show();
            }
            catch (Exception ex)
            {
                EncuestasMoviles.Clases.Error.ManejadorErrores(ex, Session["numeroUsuario"].ToString(), Session["UserDomain"].ToString(), Session["userMachineName"].ToString(), Session["UserIP"].ToString(), "frmCatalogos", int.Parse(Session["numeroUsuario"].ToString()));
            }
        }
Exemplo n.º 6
0
 public static void NotifyActionTab(string strMessage, string strTitle, bool errorFlag, Page frmName, TabContainer TC, string onOkScript = "")
 {
     try
     {
         Label  lblNoticeInfo = FindControlFromMaster <Label>("lblNoticeInfo", frmName.Master);
         Label  lblNotice     = FindControlFromMaster <Label>("lblNotice", frmName.Master);
         Image  imgNotice     = FindControlFromMaster <Image>("imgNotice", frmName.Master);
         Button btnOkAction   = FindControlFromMaster <Button>("btnOkAction", frmName.Master);
         Button btnCancel     = FindControlFromMaster <Button>("btnCancel", frmName.Master);
         lblNoticeInfo.Text        = strMessage;
         lblNotice.Text            = strTitle;
         lblNoticeInfo.ForeColor   = (errorFlag) ? System.Drawing.Color.Black : System.Drawing.Color.Black;
         lblNoticeInfo.Font.Bold   = true;
         imgNotice.ImageUrl        = (errorFlag) ? "~/images/mb_hand.gif" : "~/images/mb_information.gif";
         btnOkAction.OnClientClick = "";
         if (onOkScript != "" && !errorFlag)
         {
             btnOkAction.OnClientClick = "javascript:changeTab();";
         }
         AjaxControlToolkit.ModalPopupExtender mod = FindControlFromMaster <AjaxControlToolkit.ModalPopupExtender>("notifyPopupExtender", frmName.Master);
         mod.Show();
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
     }
 }
Exemplo n.º 7
0
    public void SetSelectedInstaller(string installerName, string installerID)
    {
        ListItem item = new ListItem(installerName, installerID);

        ddlInstallers.SelectedIndex = ddlInstallers.Items.IndexOf(item);
        AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
        if (mpInstaller != null)
        {
            mpInstaller.Show();
        }
    }
Exemplo n.º 8
0
    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Int32 a = Convert.ToInt32(GridView1.DataKeys[e.NewEditIndex][0]);

        ViewState["cod"] = a;
        AjaxControlToolkit.ModalPopupExtender mpe =
            (AjaxControlToolkit.ModalPopupExtender)(GridView1.Rows
                                                    [e.NewEditIndex].FindControl("lk1_ModalPopupExtender"));
        mpe.Show();
        e.Cancel = true;
    }
    protected void btndetalles_Click(object sender, EventArgs e)
    {
        Button       btnseleccion = (Button)sender;
        RepeaterItem item         = (RepeaterItem)btnseleccion.Parent;

        AjaxControlToolkit.ModalPopupExtender mpe = (AjaxControlToolkit.ModalPopupExtender)item.FindControl("MPEEGeneral");
        if (mpe != null)
        {
            mpe.Show();
        }
    }
Exemplo n.º 10
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     //Clear current items
     ltrCompanyInfo.Text       = "";
     installerCompanyName.Text = "";
     ddlInstallers.Items.Clear();
     ddlInstallers.DataBind();
     AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
     if (mpInstaller != null)
     {
         mpInstaller.Show();
     }
 }
 protected virtual void rdbtnTable_CheckedChanged(object sender, EventArgs e)
 {
     if (rdbtnTableWithHeaders.Checked)
     {
         txtCopyTable.Text = TableStringHeaders + TableString;
     }
     else
     {
         txtCopyTable.Text = TableString;
     }
     boxCheckAll.Checked = false;
     extenderCopy.Show();
 }
Exemplo n.º 12
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     //Clear current items
     installerCompanyName.Text        = "";
     txtPostCode.Text                 = "";
     rptInstallerCompanies.DataSource = null;
     rptInstallerCompanies.DataBind();
     lblErrorMessage.Text = string.Empty;
     AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
     if (mpInstaller != null)
     {
         mpInstaller.Show();
     }
 }
Exemplo n.º 13
0
 protected void btnHideSearch_Click(Object sender, EventArgs e)
 {
     advancedSearch.Visible    = false;
     buttonSearch.Visible      = false;
     btnSearch.Visible         = true;
     btnShowSearch.Visible     = true;
     btnHideSearch.Visible     = false;
     installerCompanyName.Text = string.Empty;
     txtPostCode.Enabled       = true;
     AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
     if (mpInstaller != null)
     {
         mpInstaller.Show();
     }
 }
Exemplo n.º 14
0
    protected void GridView2_RowEditing(object sender, GridViewEditEventArgs e)
    {
        Label3.Text = GridView2.DataKeys[e.NewEditIndex][1].ToString();
        Educom.clsqst           obj = new Educom.clsqst();
        List <Educom.clsqstprp> k   = obj.disp_rec(Convert.ToInt32(
                                                       GridView2.DataKeys[e.NewEditIndex][0]));

        GridView3.DataSource = k;
        GridView3.DataBind();
        AjaxControlToolkit.ModalPopupExtender mpe = (AjaxControlToolkit.
                                                     ModalPopupExtender)
                                                        (GridView2.Rows[e.NewEditIndex].FindControl
                                                            ("lk1_ModalPopupExtender"));
        mpe.Show();
        e.Cancel = true;
    }
Exemplo n.º 15
0
    protected void ddlInstallers_SelectedIndexChanged(object sender, EventArgs e)
    {
        try
        {
            if (ddlInstallers.SelectedIndex > -1)
            {
                Guid InstallerID = new Guid(ddlInstallers.SelectedValue);
                LinqToSqlDataContext dataCtxt = new LinqToSqlDataContext();

                var InstallerDetails = (from instDtls in dataCtxt.VW_InstallerDetails
                                        where instDtls.InstallerCompanyID == InstallerID
                                        select instDtls).FirstOrDefault();

                //var Installer = (from installers in dataCtxt.Installers
                //                 where
                //                 installers.InstallerCompanyID == InstallerID
                //                 select installers).FirstOrDefault();
                //var address = (from add in dataCtxt.InstallerAddresses
                //               where add.AddressID == Installer.AddressID
                //               select add).FirstOrDefault();

                string strCompanyInfo = "";
                strCompanyInfo = "<br/><b>" + strCompanyInfo + InstallerDetails.CompanyName + "</b><br/>";
                strCompanyInfo = strCompanyInfo + (String.IsNullOrEmpty(InstallerDetails.Accreditation) ? ("Acc: " + InstallerDetails.Accreditation + "<br/>") : "");
                strCompanyInfo = strCompanyInfo + "CSL Code: " + InstallerDetails.UniqueCode + "<br/>";
                strCompanyInfo = strCompanyInfo + InstallerDetails.AddressOne + ", " + InstallerDetails.AddressTwo + "<br/>";
                strCompanyInfo = strCompanyInfo + InstallerDetails.Town + ", " + InstallerDetails.County + "<br/>";
                strCompanyInfo = strCompanyInfo + InstallerDetails.PostCode + "<br/>";
                strCompanyInfo = strCompanyInfo + InstallerDetails.Country + "<br/>";

                ltrCompanyInfo.Text = strCompanyInfo;
                Session[enumSessions.SelectedInstaller.ToString()]  = ddlInstallers.SelectedItem.Text;
                Session[enumSessions.InstallerCompanyID.ToString()] = ddlInstallers.SelectedValue.ToString();
                AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
                if (mpInstaller != null)
                {
                    mpInstaller.Show();
                }
            }
        }
        catch (Exception objException)
        {
            CSLOrderingARCBAL.LinqToSqlDataContext db;
            db = new CSLOrderingARCBAL.LinqToSqlDataContext();
            db.USP_SaveErrorDetails(Request.Url.ToString(), ((System.Reflection.MemberInfo)(objException.TargetSite)).Name, Convert.ToString(objException.Message), Convert.ToString(objException.InnerException), Convert.ToString(objException.StackTrace), "", HttpContext.Current.Request.UserHostAddress, false, Convert.ToString(HttpContext.Current.Session[enumSessions.User_Id.ToString()]));
        }
    }
Exemplo n.º 16
0
    //Load Installers from DB
    protected void SelectHeadOffice_Click(object sender, EventArgs e)
    {
        //Clear current items
        ddlInstallers.Items.Clear();
        ddlInstallers.DataBind();
        AjaxControlToolkit.ModalPopupExtender mpInstaller = Parent.FindControl("mpInstaller") as AjaxControlToolkit.ModalPopupExtender;
        if (mpInstaller != null)
        {
            mpInstaller.Show();
        }
        string installerName          = installerCompanyName.Text.Trim().ToLower();
        LinqToSqlDataContext dataCtxt = new LinqToSqlDataContext();

        try
        {
            var installerQry = dataCtxt.GetInstallersByNameCode(installerName, installerName, Convert.ToInt32(Session[enumSessions.ARC_Id.ToString()]));
            foreach (var dbInstaller in installerQry)
            {
                ListItem item = new ListItem();
                item.Text  = dbInstaller.CompanyName + " [ " + dbInstaller.Town + ", " + dbInstaller.PostCode + " ]";
                item.Value = dbInstaller.InstallerCompanyID.ToString();
                ddlInstallers.Items.Add(item);
            }
            ddlInstallers.DataBind();

            if (ddlInstallers != null && ddlInstallers.Items.Count > 0)
            {
                ddlInstallers_SelectedIndexChanged(null, null);
            }
            else
            {
                ltrCompanyInfo.Text = "";
            }
        }
        catch (Exception exp)
        {
            ListItem item = new ListItem();
            item.Text = "Error Loading.. ";
            ddlInstallers.Items.Add(item);
            ddlInstallers.DataBind();

            ////Record on to DB
            //CSLLog.RecordException(exp.Message, exp.StackTrace, "", "", "", enumPriority.HIGH.ToString(), "", SiteUtility.GetIPAddress());
        }
    }
Exemplo n.º 17
0
    protected void lnkViewSalarySlip_Details(object sender, EventArgs e)
    {
        try
        {
            PanSalarySection.Visible = true;
            LinkButton  lnk = (LinkButton)sender;
            GridViewRow lml = (GridViewRow)lnk.NamingContainer;
            Label       lblSalaryDetailsId = lml.FindControl("lblsalDetailsId") as Label;
            DataTable   dt = TMSBusMaintananceDetails.GetStaffSalaryDetails(Convert.ToInt64(lblSalaryDetailsId.Text), Convert.ToInt64(Session["UserId"]), "Driver", null, null, null, "4").Tables[0];

            // TMSSalaryDetails objSalary = TMSSalaryDetails.Get(SalaryDetailsId);
            if (dt.Rows.Count > 0)
            {
                lblMonthName.Text = dt.Rows[0]["SI_Month"].ToString();
                lblYearName.Text  = dt.Rows[0]["SI_Year"].ToString();
                Decimal GrossSalary  = Convert.ToDecimal(dt.Rows[0]["SI_GrossSalary"].ToString());
                Decimal DeductionAmt = Convert.ToDecimal(dt.Rows[0]["SI_LeaveDeductionAmount"].ToString());
                Decimal NetSal       = GrossSalary - DeductionAmt;
                lblNetSalary.Text  = Convert.ToString(NetSal);
                lblNetSalWord.Text = NumberToWords(Convert.ToInt32(lblNetSalary.Text)).ToUpper();



                grdSalarySlip.DataSource = dt;
                grdSalarySlip.DataBind();



                lblEmployeeNmae.Text = Convert.ToString(dt.Rows[0]["BSD_StaffName"].ToString());
                lblJoiningDtae.Text  = String.Format("{0:dd MMM yyyy}", dt.Rows[0]["BSD_DateOfJoining"]);
                //lblDept.Text = Convert.ToString(dtFacultyDetails.Rows[0]["FD_SpecificExpertise"]);
                lblDesignation.Text = Convert.ToString(dt.Rows[0]["BSD_StaffType"]);
                //lblEmpCode.Text = Convert.ToString(dtFacultyDetails.Rows[0][""]);
                //lblLocation.Text = Convert.ToString(dtFacultyDetails.Rows[0]["FacultyCity"]);
            }


            Control p = lnk.Parent;
            AjaxControlToolkit.ModalPopupExtender SalarySlipPopUp = (AjaxControlToolkit.ModalPopupExtender)p.FindControl("SalarySlipPopUp");
            SalarySlipPopUp.Show();
        }
        catch (Exception ex) { }
    }
Exemplo n.º 18
0
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        Int32 a = Convert.ToInt32(GridView1.DataKeys[GridView1
                                                     .SelectedIndex][0]);

        ViewState["qstcod"] = a;
        Educom.clsqst           obj = new Educom.clsqst();
        List <Educom.clsqstprp> k   = obj.find_rec(a);

        Label3.Text    = k[0].qstdsc;
        Panel3.Visible = true;
        Educom.clsopt obj1 = new Educom.clsopt();
        GridView3.DataSource = obj1.disp_rec(a);
        GridView3.DataBind();
        AjaxControlToolkit.ModalPopupExtender mpe =
            (AjaxControlToolkit.ModalPopupExtender)
                (GridView1.Rows[GridView1.SelectedIndex].FindControl
                    ("lk1_ModalPopupExtender"));
        mpe.Show();
    }
Exemplo n.º 19
0
        public static void NotifyAction(string strMessage, string strTitle, bool errorFlag, Page frmName, string onOkScript = "")
        {
            string message;

            message = strMessage;
            Show("", "", "", frmName);
            Label  lblNoticeInfo = FindControlFromMaster <Label>("lblNoticeInfo", frmName.Master);
            Label  lblNotice     = FindControlFromMaster <Label>("lblNotice", frmName.Master);
            Image  imgNotice     = FindControlFromMaster <Image>("imgNotice", frmName.Master);
            Button btnOkAction   = FindControlFromMaster <Button>("btnOkAction", frmName.Master);
            Button btnCancel     = FindControlFromMaster <Button>("btnCancel", frmName.Master);

            lblNoticeInfo.Text        = message;
            lblNotice.Text            = strTitle;
            lblNoticeInfo.ForeColor   = (errorFlag) ? System.Drawing.Color.Black : System.Drawing.Color.Black;
            lblNoticeInfo.Font.Bold   = true;
            imgNotice.ImageUrl        = (errorFlag) ? "~/images/mb_hand.gif" : "~/images/mb_information.gif";
            btnOkAction.OnClientClick = "";
            if (onOkScript != "" && !errorFlag)
            {
                if (HttpContext.Current.Session["Redirect"] == "0")
                {
                    btnOkAction.OnClientClick = "window.location.href='frmPatient_Home.aspx';";
                }
                else
                {
                    btnOkAction.OnClientClick = onOkScript;
                }
            }
            else
            {
                btnOkAction.Visible     = false;
                btnCancel.Text          = "OK";
                btnCancel.OnClientClick = onOkScript;
            }
            UpdatePanel Updt = FindControlFromMaster <UpdatePanel>("notificationPanel", frmName.Master);

            AjaxControlToolkit.ModalPopupExtender mod = FindControlFromMaster <AjaxControlToolkit.ModalPopupExtender>("notifyPopupExtender", frmName.Master);
            mod.Show();
            Updt.Update();
        }
Exemplo n.º 20
0
        protected void imgbtn_Click(object sender, EventArgs e)
        {
            rowIndex = -1;
            Button      btndetails = sender as Button;
            GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;

            DataTable dt = (DataTable)Session["DataTable"];

            txtDName.Text       = dt.Rows[gvrow.RowIndex]["Name"].ToString();
            txtDEmail.Text      = dt.Rows[gvrow.RowIndex]["Email"].ToString();
            txtDPhone.Text      = dt.Rows[gvrow.RowIndex]["Phone"].ToString();
            txtDSkills.Text     = dt.Rows[gvrow.RowIndex]["Skills"].ToString();
            txtDSummary.Text    = dt.Rows[gvrow.RowIndex]["Summary"].ToString();
            txtDExperience.Text = dt.Rows[gvrow.RowIndex]["Experience"].ToString();
            txtDEducation.Text  = dt.Rows[gvrow.RowIndex]["Education"].ToString();
            txtDInterests.Text  = dt.Rows[gvrow.RowIndex]["Interests"].ToString();
            txtDLanguages.Text  = dt.Rows[gvrow.RowIndex]["Languages"].ToString();

            rowIndex = gvrow.RowIndex;

            AjaxControlToolkit.ModalPopupExtender mpe = (AjaxControlToolkit.ModalPopupExtender)gvrow.FindControl("ModalPopupExtender4");
            mpe.Show();
        }
Exemplo n.º 21
0
        protected void grd_RowEditing(object sender, GridViewEditEventArgs e)
        {
            try
            {
                string IdCatalogo = ((GridView)(sender)).Rows[e.NewEditIndex].Cells[0].Text;

                string DescOpcionCatalogo = ((GridView)(sender)).Rows[e.NewEditIndex].Cells[1].Text;

                AjaxControlToolkit.ModalPopupExtender extNuevaOpcionCatalogo = new AjaxControlToolkit.ModalPopupExtender();
                Label       lblTitulo             = new Label();
                Label       lblMensaje            = new Label();
                HiddenField hfAccion              = new HiddenField();
                HiddenField hfIdCatalogo          = new HiddenField();
                TextBox     txtDescOpcionCatalogo = new TextBox();


                extNuevaOpcionCatalogo = ((AjaxControlToolkit.ModalPopupExtender)ctrlOpcionCat.FindControl("mpeOpcionCatalogo"));
                lblTitulo                  = ((Label)ctrlOpcionCat.FindControl("Titulo"));
                hfAccion                   = ((HiddenField)ctrlOpcionCat.FindControl("Accion"));
                hfIdCatalogo               = ((HiddenField)ctrlOpcionCat.FindControl("IdCatalogo"));
                txtDescOpcionCatalogo      = ((TextBox)ctrlOpcionCat.FindControl("txtNomOpcCat"));
                hfAccion.Value             = "2";
                hfIdCatalogo.Value         = ((GridView)(sender)).Rows[e.NewEditIndex].Cells[4].Text;
                txtDescOpcionCatalogo.Text = DescOpcionCatalogo;
                lblTitulo.Text             = "EDITA OPCIÓN CATALOGO";
                ViewState["IdCatalogoOpc"] = IdCatalogo;

                RadPanelItem item = acModules.FindItemByValue(hfIdCatalogo.Value);
                item.Expanded = true;

                extNuevaOpcionCatalogo.Show();
            }
            catch (Exception ex)
            {
                EncuestasMoviles.Clases.Error.ManejadorErrores(ex, Session["UserName"].ToString(), Session["UserDomain"].ToString(), Session["userMachineName"].ToString(), Session["UserIP"].ToString(), "frmCatalogos", int.Parse(Session["numeroUsuario"].ToString()));
            }
        }
Exemplo n.º 22
0
        protected void btnNuevo_Click(object sender, EventArgs e)
        {
            try
            {
                AjaxControlToolkit.ModalPopupExtender extNewCatalogo = new AjaxControlToolkit.ModalPopupExtender();
                Label       lblTitulo  = new Label();
                Label       lblMensaje = new Label();
                TextBox     txtNomCat  = new TextBox();
                HiddenField hfAccion   = new HiddenField();

                extNewCatalogo = ((AjaxControlToolkit.ModalPopupExtender)ctrlNewCat.FindControl("mpeNewCatalogo"));
                lblTitulo      = ((Label)ctrlNewCat.FindControl("Titulo"));
                hfAccion       = ((HiddenField)ctrlNewCat.FindControl("Accion"));
                txtNomCat      = ((TextBox)ctrlNewCat.FindControl("txtNomCat"));
                txtNomCat.Text = string.Empty;
                hfAccion.Value = "1";
                lblTitulo.Text = "NUEVO CATALOGO";
                extNewCatalogo.Show();
            }
            catch (Exception ex)
            {
                EncuestasMoviles.Clases.Error.ManejadorErrores(ex, Session["UserName"].ToString(), Session["UserDomain"].ToString(), Session["userMachineName"].ToString(), Session["UserIP"].ToString(), "frmCatalogos", int.Parse(Session["numeroUsuario"].ToString()));
            }
        }
Exemplo n.º 23
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Button       btn  = (Button)sender;
        DataGridItem item = (DataGridItem)btn.Parent.Parent.Parent;


        Label        lblnAppointmentId = (Label)item.FindControl("lblnAppointmentId");
        int          nAppointmentId    = int.Parse(lblnAppointmentId.Text);
        TextBox      txtStartDate      = (TextBox)item.FindControl("txtStartDate");
        TextBox      txtTimeSDHH1      = (TextBox)item.FindControl("txtTimeSDHH1");
        TextBox      txtTimeSDMM1      = (TextBox)item.FindControl("txtTimeSDMM1");
        DropDownList ddlSD1            = (DropDownList)item.FindControl("ddlSD1");

        Label lblhhh = (Label)item.FindControl("lblhhh");
        Label lblmmm = (Label)item.FindControl("lblmmm");


        if (txtStartDate.Text != "" && txtTimeSDHH1.Text != "" && txtTimeSDMM1.Text != "" && ddlSD1.SelectedItem.Text != "")
        {
            int intHH2 = int.Parse(txtTimeSDHH1.Text.ToString());
            if (intHH2 <= 12)
            {
                int intMM1 = int.Parse(txtTimeSDMM1.Text.ToString());
                if (intMM1 < 60)
                {
                    TimeZoneInfo timeZoneInfo;

                    DateTime dateTimeStartTime;

                    DateTime dtStartTime = Convert.ToDateTime(txtStartDate.Text.ToString());

                    DateTime tdTodayDate = Convert.ToDateTime(DateTime.Now.ToString("MM/dd/yyyy"));


                    int intHours = int.Parse(txtTimeSDHH1.Text);
                    dtStartTime = GetDateTime(txtStartDate.Text, intHours, txtTimeSDMM1.Text, ddlSD1.SelectedItem.Text);

                    timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("UTC");

                    dateTimeStartTime = TimeZoneInfo.ConvertTime(dtStartTime, timeZoneInfo);

                    timeZoneInfo      = TimeZoneInfo.FindSystemTimeZoneById("UTC");
                    dateTimeStartTime = TimeZoneInfo.ConvertTime(dateTimeStartTime, timeZoneInfo);

                    int nUserId = int.Parse(Session["UserId"].ToString());
                    DALmstAppointmentManagement objDALmstAppointmentManagement = new DALmstAppointmentManagement();
                    DataSet dsDALmstAppointmentManagement = new DataSet();

                    dsDALmstAppointmentManagement = objDALmstAppointmentManagement.UpdateAppoinmentReSchedule(nUserId, nAppointmentId, dateTimeStartTime);
                    BindAllAppoinments();
                }
                else
                {
                    lblmmm.Visible = true;
                    lblhhh.Visible = false;
                    lblmmm.Text    = "Select Hours Between 1 To 60";
                    AjaxControlToolkit.ModalPopupExtender modal = (AjaxControlToolkit.ModalPopupExtender)item.FindControl("ModalPopupExtenderName");
                    modal.Show();
                }
            }
            else
            {
                lblhhh.Visible = true;
                lblmmm.Visible = false;
                lblhhh.Text    = "Select Hours Between 1 To 12";
                AjaxControlToolkit.ModalPopupExtender modal = (AjaxControlToolkit.ModalPopupExtender)item.FindControl("ModalPopupExtenderName");
                modal.Show();
            }
        }
        else
        {
            string strTitle        = "Alert";
            string strDescriptions = "Please Enter Data";
            NotificationMessage2.NotificationDetails(strTitle, strDescriptions);
            AjaxControlToolkit.ModalPopupExtender modal = (AjaxControlToolkit.ModalPopupExtender)item.FindControl("ModalPopupExtenderName");
            modal.Show();
        }
    }
    //public string ControlIDPopup
    //{
    //    set { this.mpeLoading.TargetControlID = value; }
    //}
    #endregion

    #region MEDOTO SHOW POPUP
    //public void ShowPopup()
    //{
    //    this.mpeLoading.Show();
    //}
    #endregion

    #region MEDOTO HIDE POPUP
    //public void HidePopup()
    //{
    //    this.mpeLoading.Hide();
    //}
    #endregion

    #region PAGE LOAD DEL CONTROL
    protected void Page_Load(object sender, EventArgs e)
    {
        AjaxControlToolkit.ModalPopupExtender mpe = (AjaxControlToolkit.ModalPopupExtender)UpdateProgress1.FindControl("pnlLoading_ModalPopupExtender");
        mpe.Enabled = true;
        mpe.Show();
    }