Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserLogin"] == null)
            {
                Session.Clear();
                Session.Abandon();
                ViewState.Clear();
                FormsAuthentication.SignOut();

                Response.Redirect("~/Account/Login.aspx");
            }

            if (!IsPostBack)
            {
                Session["UpdResult"] = null;

                string _companyNo = Request.QueryString["CompanyNo"];

                MAS_COMPANYUSER_DTO retUser = (MAS_COMPANYUSER_DTO)Session["UserLogin"];
                hdfUserName.Value = retUser.UserName.ToString().Trim();
                hdfUsersNo.Value  = retUser.UsersNo.ToString().Trim();
                hdfRoleNo.Value   = retUser.RolesNo.ToString().Trim();

                hdfCompanyNo.Value = string.IsNullOrWhiteSpace(_companyNo) ? retUser.CompanyNo.ToString().Trim() : _companyNo;

                GetCompanyUserDetail();
                //GetCompanyUserAttachFile();
            }
        }
 //=====================================================================
 //  FunctionName : btnStatistic_Click
 /// <summary>
 /// 统计结果按钮控件Click事件
 /// </summary>
 //=====================================================================
 protected void btnStatistic_Click(object sender, EventArgs e)
 {
     statisticpage.Style.Add("display", "none");
     statisticresultpage.Visible = true;
     ViewState.Clear();
     Initalize();
 }
Exemplo n.º 3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        int CrewID = 0;

        if (Request.QueryString["CrewID"] != null)
        {
            btnSave.Enabled = false;
            if (txtCompanyName.Text.Trim() == "" || txtMonths.Text.Trim() == "" || txtDays.Text.Trim() == "")
            {
                lblMessageText.Text = "Enter all details correctly";
            }
            else
            {
                CrewID = int.Parse(Request.QueryString["CrewID"].ToString());
                objCrewBLL.INS_CrewPreJoiningExp(CrewID, txtCompanyName.Text, int.Parse(ddlRank.SelectedValue), int.Parse(txtMonths.Text), int.Parse(txtDays.Text), int.Parse(Session["USERID"].ToString()));

                lblMessageText.Text = "Pre-Joining Experience saved.";

                string js = "closeDialog('#dialog')";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "error", js, true);
                ViewState.Clear();
            }
        }
        else
        {
            lblMessageText.Text = "Crew information not valid !!";
        }
    }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.EnableViewState = true;

            if (CheckQueryStringValues())
            {

                web = SPContext.Current.Site.OpenWeb(new Guid(this.Page.Request.QueryString[WEBIDQSKEYNAME]));
                file = web.GetFile(new Guid(this.Page.Request.QueryString[ITEMIDQSKEYNAME]));
                item = file.Item;

                WebPartServiceInit();
                FindWebPart();

                //Only set the values if not postback or callback
                if (Page.IsPostBack && Page.IsCallback)
                {
                    
                    ViewState.Clear();
                    SetValues();
                }
                else
                {
                    CreateChildControls();
                    GetValues();
                }
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //ScriptManager.RegisterClientScriptBlock(this, typeof(System.Web.UI.Page), "DisableItems", "DisableItems();", true);

            Session["Submit"] = false;

            PersonalInfo1.displayName += new Panels.PersonalInfo.PassName(passESignName);
            //PersonalInfo1.selectedState += new Panels.PersonalInfo.PassName(UpdateTNCheckList);
            PersonalInfo1.getAge += new Panels.PersonalInfo.PassAge(updateAge);
            //Enroll.programTuition += new Panels.EnrollmentInfo.TuitionDoc(TuitionDoc);
            Enroll.militarySelect +=new Panels.EnrollmentInfo.Military(MilitaryTuition);
            Enroll.campusSelect += new Panels.EnrollmentInfo.Campus(CampusTuition);
            Enroll.programSelect += new Panels.EnrollmentInfo.Program(ProgramTuition);
            Enroll.dayNightSelect += new Panels.EnrollmentInfo.PassDayNight(DayNight);
            Enroll.louisaCountySelect += new Panels.EnrollmentInfo.Louisa(LouisaCounty);
            Enroll.carlisleNicholasCountySelect += new Panels.EnrollmentInfo.CarlisleNicholas(CarlisleNicholasCounty);
            Enroll.mayfieldSelect += new Panels.EnrollmentInfo.Mayfield(MayfieldCounty);
            Enroll.degreeSelect += new Panels.EnrollmentInfo.Degree(DegreeType);
            Enroll.startDateSelect += new Panels.EnrollmentInfo.StartDate(StartDate);

            if (!Page.IsPostBack)
            {
                ViewState.Clear();
                Session.Abandon();
                pnlStep2.Visible = false;
            }

        }
Exemplo n.º 6
0
 protected void btnSearch_ServerClick(object sender, EventArgs e)
 {
     keyword = txtSearch.Value;
     param   = "keyword";
     ViewState.Clear();
     ShowSearchResult();
 }
Exemplo n.º 7
0
        private void InitialParameter()
        {
            try
            {
                string _decryptCompanyNo = Request.QueryString["Company"];
                string _decryptProjectNo = Request.QueryString["Project"];

                GlobalFunction func = new GlobalFunction();
                _decryptCompanyNo = func.Decrypt(Request.QueryString["Company"]);
                _decryptProjectNo = func.Decrypt(Request.QueryString["Project"]);

                hdfCompanyNo.Value = GlobalFunction.DecryptParam(_decryptCompanyNo.Trim());
                hdfProjectNo.Value = GlobalFunction.DecryptParam(_decryptProjectNo.Trim());
            }
            catch (Exception ex)
            {
                logger.Error(ex.Message);
                logger.Error(ex.StackTrace);

                Session.Clear();
                Session.Abandon();
                ViewState.Clear();
                FormsAuthentication.SignOut();

                Response.Redirect("~/Account/Login.aspx", true);
            }
        }
Exemplo n.º 8
0
        private string SaveByMethod(string method)
        {
            if (ViewState["itemVS"] == null)
            {
                GetCompany();

                return("Please add some item.");
            }
            else
            {
                ItemViewModels = (List <ItemViewModel>)ViewState["itemVS"];

                foreach (ItemViewModel itemView in ItemViewModels)
                {
                    StockOut stockOut = new StockOut();
                    stockOut.ItemId   = itemView.ItemId;
                    stockOut.Quantity = itemView.Quantity;
                    stockOut.Method   = method;
                    stockOut.Date     = DateTime.Today;

                    StockOutManager.Save(stockOut);
                    StockOutManager.Update(stockOut.ItemId, stockOut.Quantity);
                }

                ViewState.Clear();

                GetCompany();

                return("Saved Into " + method);
            }
        }
Exemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB", false);

            if (!Page.IsPostBack)
            {
                if (Session["RegDetail"] != null)
                {
                    //InitialParameter();
                    Session["IsAnswer"] = null;

                    string _sRegDetai = (string)Session["RegDetail"];
                    if (!string.IsNullOrEmpty(_sRegDetai))
                    {
                        hdfCompanyNo.Value = _sRegDetai.Trim().Split(':')[0];
                        hdfProjectNo.Value = _sRegDetai.Trim().Split(':')[1];
                    }
                }
                else
                {
                    Session.Clear();
                    Session.Abandon();
                    ViewState.Clear();
                    FormsAuthentication.SignOut();

                    Response.Redirect("~/Account/Login.aspx", true);
                }
            }
        }
 protected void BtnLogout_Click(object sender, EventArgs e)
 {
     Response.Cookies.Clear();
     Session.Clear();
     ViewState.Clear();
     Response.Redirect("Login.aspx");
 }
Exemplo n.º 11
0
    //*******************************************************
    //** Function Name: Page_Load
    //** Description: Occurs when the page is loaded
    override protected void OnLoad(System.EventArgs e)
    {
        base.OnLoad(e);
        if (!(Page.IsPostBack))
        {
            if (SessionHelper.GetValue <bool>(Session["Award_Redeemed"]))
            {
                //Clearing these ensures that the most current data is used for session and error checking.
                Session.Clear();
                ViewState.Clear();
            }
        }

        Table tblInfo = this.tblInfo;
        //TextBox txtRedempCode = (TextBox)tblInfo.FindControl("txtRedemptionCode");
        TextBox txtRedempComments = (TextBox)tblInfo.FindControl("txtRedemptionComments");
        Button  btnLookUp         = (Button)tblInfo.FindControl("btnLookUp");
        Button  btnRedeem         = (Button)tblInfo.FindControl("btnRedeem");

        //add javascript function to the txtRedemptionCode and txtRedemptionComments textboxes to allow
        // for hitting enter and having it call the correct submit button
        //txtRedempCode.Attributes.Add("onkeypress", "return clickBtn(event, '" + btnLookUp.ClientID + "')");
        txtRedemptionCode.Attributes.Add("onkeypress", "return clickBtn(event, '" + btnLookUp.ClientID + "')");
        txtRedempComments.Attributes.Add("onkeypress", "return clickBtn(event, '" + btnRedeem.ClientID + "')");
        btnRedeem.Attributes.Add("onclick", "if (confirm('Upon clicking yes, this award will be marked as redeemed and cannot be redeemed again.  Please be sure you have your Visa gift card.')){}else{return false;}");
        //calls local reference of "GetCurrentUser" in case the user is accessing the page without visiting
        //The default page that gets the user's identification
        GetCurrentUser();
    }
Exemplo n.º 12
0
        private void AltaPagos()
        {
            try {
                Helpers h      = new Helpers();
                string  query  = @"INSERT INTO [dbo].[Tabla_Registro_PagosB]           ([Id_FichaIdentificacion]           ,[Id_Usuario]           ,[Id_Consulta]           ,[Id_FormaPago]           ,[FechaAlta_Pagos]           ,[Descripcion_Pagos]           ,[Origen_Pagos]           ,[Importe_Pagos]           ,[Pagado_Pagos]           ,[Debe_Pagos]           ,[FechaParaPagar_Pagos]           ,[FechaPagado_Pagos]           ,[Id_ConceptoPago])     VALUES           (           @Id_FichaIdentificacion           ,@Id_Usuario           ,@Id_Consulta           ,@Id_FormaPago           ,@FechaAlta_Pagos           ,@Descripcion_Pagos           ,@Origen_Pagos           ,@Importe_Pagos           ,@Pagado_Pagos           ,@Debe_Pagos           ,@FechaParaPagar_Pagos           ,@FechaPagado_Pagos           ,@Id_ConceptoPago)";
                var     PagoUp = new Tabla_Registro_PagosDTO();
                PagoUp.Id_FichaIdentificacion = ddlFichas.SelectedIndex;
                PagoUp.Id_Usuario             = 1;
                PagoUp.Id_Consulta            = 1;
                PagoUp.Id_FormaPago           = 1;
                PagoUp.FechaAlta_Pagos        = DateTime.Now;
                PagoUp.Descripcion_Pagos      = "DES";
                //Request.Form["txtDescripcionPago"]
                //Convert.ToDecimal(Request.Form["txtOrigenPago"]);
                PagoUp.Origen_Pagos         = "DES";
                PagoUp.Importe_Pagos        = 1000;
                PagoUp.Pagado_Pagos         = 100;
                PagoUp.Debe_Pagos           = 100;
                PagoUp.FechaParaPagar_Pagos = DateTime.Now;
                PagoUp.FechaPagado_Pagos    = DateTime.Now;
                PagoUp.Id_ConceptoPago      = 1;

                h.ExecuteNonQueryParam(query, PagoUp);
            }
            catch (Exception ex) {
                ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "Alert", "alert('ERROR,'" + ex + "')", true);
            }
            ViewState.Clear();
            Response.Redirect(Request.RawUrl);
        }
Exemplo n.º 13
0
 private void Clear(bool afterSave)
 {
     if (afterSave)
     {
         lblGradingCodeValue.Text  = string.Empty;
         lblGraderCupperValue.Text = string.Empty;
         txtCommodity.Text         = string.Empty;
         drpCommodityClass.ClearSelection();
         drpProductionYear.ClearSelection();
         drpCommodityClass.DataSource = new DataTable();
         drpCommodityClass.DataBind();
         drpCommodityClass.Items.Clear();
         drpCommodityFactorGroup.DataSource = new DataTable();
         drpCommodityFactorGroup.DataBind();
         drpCommodityFactorGroup.Items.Clear();
         drpGrade.DataSource = new DataTable();
         drpGrade.DataBind();
         drpGrade.Items.Clear();
         ViewState.Clear();
     }
     drpCommodityFactorGroup.ClearSelection();
     drpGrade.ClearSelection();
     txtDateRecived.Text = DateTime.Now.ToShortDateString();
     txtTimeRecived.Text = DateTime.Now.ToShortTimeString();
     //drpProductionYear.ClearSelection();
     gvGradingFactors1.DataSource = new DataTable();
     gvGradingFactors1.DataBind();
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserLogin"] == null)
            {
                Session.Clear();
                Session.Abandon();
                ViewState.Clear();
                FormsAuthentication.SignOut();

                Response.Redirect("~/Account/Login.aspx");
            }

            Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
            if (!Page.IsPostBack)
            {
                MAS_COMPANYUSER_DTO retUser = (MAS_COMPANYUSER_DTO)Session["UserLogin"];
                if (retUser.RolesNo > 0)
                {
                    hdfCompanyNo.Value = retUser.CompanyNo.ToString().Trim();
                    hdfUserName.Value  = retUser.UserName;
                    hdfUserNo.Value    = retUser.UsersNo.ToString().Trim();
                    hdfRoleNo.Value    = retUser.RolesNo.ToString();

                    //Mas_BiddingCompany_Manage cManage = new Mas_BiddingCompany_Manage();
                    //MAS_BIDDINGCOMPANY comData = new MAS_BIDDINGCOMPANY();
                    //comData = cManage.GetBiddingCompany(retUser.CompanyNo.ToString());
                    //lblCompanyName.Text = comData.CompanyName;
                }

                InitialControl();
            }
        }
Exemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserLogin"] == null)
            {
                Session.Clear();
                Session.Abandon();
                ViewState.Clear();
                FormsAuthentication.SignOut();

                Response.Redirect("~/Account/Login.aspx");
            }

            if (!Page.IsPostBack)
            {
                Session["CompanyUserRPT"] = null;

                MAS_COMPANYUSER_DTO retUser = (MAS_COMPANYUSER_DTO)Session["UserLogin"];
                if (retUser.RolesNo > 0)
                {
                    if (retUser.RolesNo == 1)
                    {
                        btnExport.Visible = true;
                    }
                    else
                    {
                        btnExport.Visible = false;
                    }
                }

                ViewState["SortGridview"] = "CompanyNo ";

                BindCompanyUser();
            }
        }
Exemplo n.º 16
0
 protected void SaveNewChart_Click(object sender, EventArgs e)
 {
     try
     {
         if (bValidate())
         {
             CUSTOMRP.BLL.AppHelper.AddNewChart(1, "CUSTOMRP", new CUSTOMRP.BLL.AppHelper.t_QueryReportDashboard
             {
                 View            = this.newform_view.SelectedValue.Substring(8),
                 Type            = this.newform_type.SelectedIndex,
                 GroupBy         = this.newform_groupby.SelectedValue,
                 Title           = this.newform_chartTitle.Text,
                 AggregateType   = int.Parse(this.newform_agg.SelectedValue),
                 AggregateColumn = this.newform_agg_column.SelectedValue
             });
             ViewState.Clear();
             Response.Redirect("./rpportal.aspx");
         }
         else
         {
             ViewState.Clear();
         }
     }
     catch
     {
     }
 }
 private void clearUi()
 {
     ViewState.Clear();
     questionsCreated = 0;
     QuizzName.Text   = "";
     RadioButtonList_ChoixUV.ClearSelection();
     forcePostBack();
 }
Exemplo n.º 18
0
 protected void btnLogout_Click(object sender, EventArgs e)
 {
     HttpContext.Current.Session.Clear();
     HttpContext.Current.Session.Abandon();
     ViewState.Clear();
     FormsAuthentication.SignOut();
     Response.Redirect("~/soporte/autenticar/Autenticar");
 }
Exemplo n.º 19
0
 protected void lbtnLogout_Click(object sender, EventArgs e)
 {
     Session["ADMIN"] = null;
     HttpContext.Current.Session.Clear();
     HttpContext.Current.Session.Abandon();
     ViewState.Clear();
     Response.Redirect("/logon.aspx");
 }
Exemplo n.º 20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         ViewState.Clear();
     }
     //string js = "function newChartViewChange(){var selected=[];$('#newform_groupby option:selected').each(function(index,brand){selected.push([$(this).val()])});$('#newform_chartTitle').val($('#newform_view').children('option').filter(':selected').text().replace(/(_|qreport.(TBD_)?v_(QR_)?)/gi,'')+' by '+selected.toString())}$(document).ready(function(){$('#newform_groupby').multiselect({selectAllValue:'multiselect-all',enableCaseInsensitiveFiltering:true,enableFiltering:true,onChange:function(element,checked){newChartViewChange()}})});";
     //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "mydata3", js, true);
 }
Exemplo n.º 21
0
 protected void imbLogout_Click(object sender, ImageClickEventArgs e)
 {
     ViewState.Clear();
     Session.Clear();
     Session.Abandon();
     FormsAuthentication.SignOut();
     Response.Redirect(FormsAuthentication.LoginUrl);
     //FormsAuthentication.RedirectToLoginPage();
 }
Exemplo n.º 22
0
 protected void btnLogOut_Click(object sender, EventArgs e)
 {
     Session.Abandon();
     HttpContext.Current.Session.Clear();
     HttpContext.Current.Session.Abandon();
     ViewState.Clear();
     FormsAuthentication.SignOut();
     Session["UserID"] = "0";
     Response.Redirect("~/Default.aspx");
 }
Exemplo n.º 23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["ErrorException"] != null)
     {
         Log.Error((Exception)Session["ErrorException"]);
         //SendMail();
     }
     Session.Clear();
     ViewState.Clear();
 }
Exemplo n.º 24
0
    protected void filter(object sender, EventArgs e)
    {
        ViewState.Clear();
        //  letter1.Visible = false;
        //string  letter = (string)e.CommandArgument;
        LinkButton letter = sender as LinkButton;

        Session["serch"] = letter.Text;
        bindtype(letter.Text);
    }
Exemplo n.º 25
0
 protected void exit(object sender, MenuEventArgs e)
 {
     if (e.Item.Text == "Exit")
     {
         FormsAuthentication.SignOut();
         Session.Clear();
         ViewState.Clear();
         Response.Redirect("~/Default.aspx");
     }
 }
Exemplo n.º 26
0
    protected void ButtonSave_Click(object sender, EventArgs e)
    {
        if (!Privacy.Checked)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "InvalidPrivacy", "alert(\"Si prega di accettare l'informativa sulla privacy.\");", true);

            return;
        }
        if (!captcha.IsValid(Check.Text))
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "InvalidCaptcha", "alert('Il codice di verifica che hai inserito non è valido.');", true);
            Check.Text = "";
            captcha.SetCaptcha();
            return;
        }
        DateTime dt;

        if (!ParseDate(TextBoxBirthDate.Text, out dt))
        {
            return;
        }
        EventSubscriptor sbscr = DBHelper.LoadSubscriptor(TextBoxMail.Text);

        if (sbscr == null)
        {
            sbscr       = new EventSubscriptor();
            sbscr.EMail = TextBoxMail.Text;
            int dummy;
            int.TryParse(SubscriptionId.Value, out dummy);
            sbscr.Id = dummy;
        }
        sbscr.BirthDate    = dt;
        sbscr.EventId      = EventInfo.CurrentEventId;
        sbscr.UserId       = 0;// LoginState.User.Id;
        sbscr.Name         = TextBoxName.Text;
        sbscr.Surname      = TextBoxSurname.Text;
        sbscr.Club         = TextBoxGroup.Text;
        sbscr.GenderNumber = (short)RadioButtonListGender.SelectedIndex;
        DBHelper.SaveSubscriptor(sbscr);
        Helper.SendMail(sbscr.EMail, null, "*****@*****.**", "Conferma iscrizione " + EventInfo.CurrentEventName,
                        "Ciao " + TextBoxName.Text +
                        ", ti confermiamo l'avvenuta iscrizione, grazie per esserti registrato all'evento <b>" +
                        EventInfo.CurrentEventName +
                        "</b>. Buon divertimento!",
                        true);

        //LoadSubscriptors();



        Page.ClientScript.RegisterStartupScript(GetType(), "MessageOK", "alert('Informazioni salvate correttamente. Grazie per esserti registrato.');", true);
        ViewState.Clear();

        RefreshCurrentSubscriptor();
    }
Exemplo n.º 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserLogin"] == null)
            {
                Session.Clear();
                Session.Abandon();
                ViewState.Clear();
                FormsAuthentication.SignOut();

                Response.Redirect("~/Account/Login.aspx");
            }
            else
            {
                System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("en-GB", false);
                Page.ClientScript.RegisterOnSubmitStatement(typeof(Page), "closePage", "window.onunload = CloseWindow();");

                if (!Page.IsPostBack)
                {
                    GlobalFunction func       = new GlobalFunction();
                    string         _ProjectNo = Request.QueryString["ProjectNo"];
                    string         _CompanyNo = Request.QueryString["CompanyNo"];
                    if (string.IsNullOrEmpty(_ProjectNo) || string.IsNullOrEmpty(_CompanyNo))
                    {
                        Session.Clear();
                        Session.Abandon();
                        ViewState.Clear();
                        FormsAuthentication.SignOut();

                        Response.Redirect("~/Account/Login.aspx");
                    }
                    else
                    {
                        hdfProjectNo.Value = func.Decrypt(_ProjectNo.Trim());
                        hdfCompanyNo.Value = func.Decrypt(_CompanyNo.Trim());
                    }

                    MAS_COMPANYUSER_DTO retUser = (MAS_COMPANYUSER_DTO)Session["UserLogin"];
                    if (retUser.UsersNo > 0)
                    {
                        string _RoleNo = retUser.RolesNo.ToString();
                        GetCompQuestionaire(_RoleNo);
                    }
                    else
                    {
                        Session.Clear();
                        Session.Abandon();
                        ViewState.Clear();
                        FormsAuthentication.SignOut();

                        logger.Info("Session UserLogin has no data..!");
                        Response.Redirect("~/Account/Login.aspx", true);
                    }
                }
            }
        }
Exemplo n.º 28
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //Session["UsuarioID"] = 0;
     Session.Clear();
     ViewState.Clear();
     FormsAuthentication.SignOut();
     //Server.Transfer("~/Default.aspx", false);
     //Server.Transfer("~/", false);
     Response.Redirect("~/Default.aspx");
     //FormsAuthentication.RedirectToLoginPage();
 }
Exemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserLogin"] == null)
            {
                Session.Clear();
                Session.Abandon();
                ViewState.Clear();
                FormsAuthentication.SignOut();

                Response.Redirect("~/Account/Login.aspx");
            }

            if (!Page.IsPostBack)
            {
                MAS_COMPANYUSER_DTO sessionUserDet = (MAS_COMPANYUSER_DTO)Session["UserLogin"];
                hdfRoleNo.Value    = sessionUserDet.RolesNo.ToString().Trim();
                hdfCompanyNo.Value = sessionUserDet.CompanyNo.ToString().Trim();

                if (!string.IsNullOrWhiteSpace(Request.QueryString["UserName"]))
                {
                    string         _strPara = Request.QueryString["UserName"];
                    GlobalFunction fDecrypt = new GlobalFunction();
                    string         decPara  = fDecrypt.Decrypt(_strPara);

                    hdfUserName.Value  = decPara;
                    hdfCompanyNo.Value = null;
                }
                else
                {
                    hdfUserName.Value = sessionUserDet.UserName.ToString().Trim();
                    if (sessionUserDet.RolesNo == 2)
                    {
                        linkQuestionaire.Visible = false;
                        btnCancel.Visible        = false;

                        linkChangePass.Attributes["href"]    = "~/Account/ChangePassword.aspx";
                        linkChangeProfile.Attributes["href"] = "~/Form/EditUserRegister.aspx";
                    }
                    else if (sessionUserDet.RolesNo == 1)
                    {
                        linkQuestionaire.Visible = true;
                        btnCancel.Visible        = true;
                    }
                }

                GetUserAccountDetail();

                GetCompanyUserDetail();

                GetCompanyUserAttachFile();
            }
        }
Exemplo n.º 30
0
        protected void saveTreatmentButton_Click(object sender, EventArgs e)
        {
            if (addTreatmentGridView.Rows.Count == 0 || patientAgeTextBox.Text == "")
            {
                messageLabel.Text = "Please Add Information First";
            }
            else
            {
                messageLabel.Text = centerManager.SaveTreatmentInfo(Treatments);

                ViewState.Clear();
            }
        }