Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region JS İçin Admin Root mu Değil mi?
            Class.Fonksiyonlar.JavaScript.Ekle("var AdminRoot = function(){return " + Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Root(Class.Fonksiyonlar.Admin.Genel.AdminID()).ToString().ToLower() + ";};");
            #endregion

            #region Oturum Kontrol
            if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
            {
                #region Oturum Yoksa Postala
                Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa(), false);
                Context.ApplicationInstance.CompleteRequest();
                return;

                #endregion
            }
            else
            {
                #region JS İçin Header Yolu
                Class.Fonksiyonlar.JavaScript.Ekle("var HeaderYolu = \"" + Class.Degiskenler.Site.Yollar.Haber.Replace(@"\", "\\\\") + "\";");
                #endregion

                #region Sayfa Adını Al
                SayfaAdi = Request.Url.LocalPath.Split('/')[Request.Url.LocalPath.Split('/').Count() - 1].Replace(Request.CurrentExecutionFilePathExtension, "");
                #endregion

                #region Row Selection Modeli
                RSM = GridPanel1.SelectionModel.Primary as RowSelectionModel;
                #endregion

                #region Icon Register Olayı
                if (!IsPostBack)
                {
                    ResourceManager1.RegisterIcon(Icon.Cancel);
                }
                #endregion

                #region Veri Cacheden Mi Gelecek?
                if (Request.QueryString["cache"] != null)
                {
                    if (Request.QueryString["cache"].ToString().Trim() == "ok")
                    {
                        CacheOlayi = true;
                    }
                }
                #endregion

                #region Dil Seç
                if (!IsPostBack)
                {
                    AdminClass.StoreDoldurDil(StoreDil, true);
                }
                if (string.IsNullOrEmpty(ComboBoxDil.SelectedItem.Value))
                {
                    ComboBoxDil.SelectedItem.Value = AdminClass.AnaDilID();
                }
                #endregion
            }
            #endregion
        }
Example #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region JS İçin Admin Root mu Değil mi?
        Class.Fonksiyonlar.JavaScript.Ekle("var AdminRoot = function(){return " + Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Root(Class.Fonksiyonlar.Admin.Genel.AdminID()).ToString().ToLower() + ";};");
        #endregion

        #region Oturum Kontrol
        if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
        {
            #region Oturum Yoksa Postala
            Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa());
            return;

            #endregion
        }
        else
        {
            #region Sayfa Adını Al
            SayfaAdi = Request.Url.LocalPath.Split('/')[Request.Url.LocalPath.Split('/').Count() - 1].Replace(Request.CurrentExecutionFilePathExtension, "");
            #endregion

            #region Row Selection Modeli
            RSM = GridPanel1.SelectionModel.Primary as RowSelectionModel;
            #endregion

            #region Icon Register Olayı
            if (!IsPostBack)
            {
                ResourceManager1.RegisterIcon(Icon.Cancel);
                ResourceManager1.RegisterIcon(Icon.Error);
                ResourceManager1.RegisterIcon(Icon.Information);
            }
            #endregion

            #region Veri Cacheden Mi Gelecek?
            if (Request.QueryString["cache"] != null)
            {
                if (Request.QueryString["cache"].ToString().Trim() == "ok")
                {
                    CacheOlayi = true;
                }
            }
            #endregion

            #region Dil Seç
            if (!IsPostBack)
            {
                StoreDoldurDil(StoreDil);
            }
            if (string.IsNullOrEmpty(ComboBoxDil.SelectedItem.Value))
            {
                using (BaglantiCumlesi SME = new BaglantiCumlesi())
                {
                    ComboBoxDil.SelectedItem.Value = SME.tbl_diller.Where(x => x.ana_dil == true).Select(x => x.id).FirstOrDefault().ToString();
                }
            }
            #endregion
        }
        #endregion
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Oturum Kontrol
            if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
            {
                #region Oturum Yoksa Postala
                Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa(), false);
                Context.ApplicationInstance.CompleteRequest();
                return;

                #endregion
            }
            else
            {
                ResimleriGetir();

                #region Verileri Listeleme
                if (!X.IsAjaxRequest)
                {
                    VerileriGetir();
                    Label2.Html = "İlgili resimler " + "<b><u>" + Class.Degiskenler.Site.Yollar.Urun + "</u></b>" + " klasöründen gösterilmektedir.";
                }
                #endregion
            }
            #endregion

            #region Icon Register Olayı
            if (!IsPostBack)
            {
                ResourceManager1.RegisterIcon(Icon.Error);
            }
            #endregion
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Response.Write(Class.Fonksiyonlar.Genel.Sifrele("q"));

            #region Oturum Varsa Panele Yönlendir
            if (Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
            {
                Response.Redirect("panel.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond), false);
                Context.ApplicationInstance.CompleteRequest();
                return;
            }
            #endregion

            #region Icon Register Olayı
            if (!IsPostBack)
            {
                ResourceManager1.RegisterIcon(Icon.Cup);
                ResourceManager1.RegisterIcon(Icon.Error);
            }
            #endregion

            #region Tarayıcı IE ise Uyarı Ver
            if (!IsPostBack)
            {
                if (Request.Browser.Browser == "IE")
                {
                    Notification.Show(new NotificationConfig
                    {
                        Icon         = Ext.Net.Icon.Error,
                        Title        = "Tarayıcı Uyarısı",
                        Width        = 300,
                        Height       = 160,
                        BodyStyle    = "background:#fff",
                        BringToFront = true,

                        AlignCfg = new NotificationAlignConfig
                        {
                            ElementAnchor = AnchorPoint.TopRight,
                            TargetAnchor  = AnchorPoint.TopRight,
                            OffsetX       = -20,
                            OffsetY       = 20
                        },

                        ShowFx = new SlideIn {
                            Anchor = AnchorPoint.TopRight, Options = new FxConfig {
                                Easing = Easing.BounceIn
                            }
                        },
                        HideFx = new Ghost {
                            Anchor = AnchorPoint.TopRight, Options = new FxConfig {
                                Duration = 3600
                            }
                        },
                        Html = "<p style=\"padding:5px;text-align:left\">Sayın yönetici; <br/><br/>Yönetici panelinin en iyi şekilde görüntülenebilmesi, daha hızlı bir biçimde gezilebilmesi ve işlemlerinizi sorunsuz bir biçimde gerçekleştirebilmeniz için <a target=\"_blank\" href=\"http://www.mozilla-europe.org/tr\"><b>Mozilla Firefox</b></a>, <a target=\"_blank\" href=\"http://www.opera.com/download\"><b>Opera</b></a>, <a target=\"_blank\" href=\"http://www.google.com/chrome/index.html?hl=tr\"><b>Chrome</b></a>, <a target=\"_blank\" href=\"http://www.apple.com/safari\"><b>Safari</b></a> tarayıcılarından herhangi birini kullanmanızı tavsiye etmekteyiz.<br/><br/>Anlayışınız için teşekkür ederiz.</p>"
                    });
                }
            }
            #endregion
        }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["timeout"] != null && Request.QueryString["timeout"].ToString() == "yes")
     {
         lblError.Text = Resources.Common.SessionDisconnected;
     }
     ResourceManager1.RegisterIcon(Icon.Tick);
     ResourceManager1.RegisterIcon(Icon.Error);
 }
Example #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region JS İçin Admin Root mu Değil mi?
        Class.Fonksiyonlar.JavaScript.Ekle("var AdminRoot = function(){return " + Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Root(Class.Fonksiyonlar.Admin.Genel.AdminID()).ToString().ToLower() + ";};");
        #endregion

        #region Oturum Kontrol
        if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
        {
            #region Oturum Yoksa Postala
            Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa());
            return;

            #endregion
        }
        else
        {
            #region JS İçin İkon Yolu
            Class.Fonksiyonlar.JavaScript.Ekle("var IkonYolu = \"" + Class.Degiskenler.Site.Yollar.Bayrak.Replace(@"\", "\\\\") + "\";");
            #endregion

            #region Sayfa Adını Al
            SayfaAdi = Request.Url.LocalPath.Split('/')[Request.Url.LocalPath.Split('/').Count() - 1].Replace(Request.CurrentExecutionFilePathExtension, "");
            #endregion

            #region Row Selection Modeli
            RSM = GridPanel1.SelectionModel.Primary as RowSelectionModel;
            #endregion

            #region Icon Register Olayı
            if (!IsPostBack)
            {
                ResourceManager1.RegisterIcon(Icon.Cancel);
                ResourceManager1.RegisterIcon(Icon.Information);
                ResourceManager1.RegisterIcon(Icon.Error);
            }
            #endregion

            #region Veri Cacheden Mi Gelecek?
            if (Request.QueryString["cache"] != null)
            {
                if (Request.QueryString["cache"].ToString().Trim() == "ok")
                {
                    CacheOlayi = true;
                }
            }
            #endregion
        }
        #endregion
    }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ResourceManager1.RegisterIcon(Icon.Tick);
            ResourceManager1.RegisterIcon(Icon.Error);
            if (Request.QueryString["timeout"] != null && Request.QueryString["timeout"].ToString() == "yes")
            {
                //lblError.Text = Resources.Common.SessionDisconnected;
            }
            if (!IsPostBack && Request.QueryString["account"] != null)
            {
                tbAccountName.Text = Request.QueryString["account"];
                DirectCheckField(tbAccountName.Text);
            }
            if (!IsPostBack && Request.Cookies["accountName"] != null)
            {
                tbAccountName.Text = Request.Cookies["accountName"].Value;
                DirectCheckField(tbAccountName.Text);
            }
            if (!IsPostBack)
            {
                tbAccountName.IndicatorIcon = Icon.Accept;
                ResourceManager1.RegisterIcon(Icon.Accept);
            }
            if (!IsPostBack && Request.Cookies["email"] != null)
            {
                tbUsername.Text         = Request.Cookies["email"].Value;
                tbPassword.Text         = Request.Cookies["password"].Value;
                rememberMeCheck.Checked = true;
            }

            if (!X.IsAjaxRequest)
            {
                ResourceManager1.RegisterIcon(Icon.Tick);
                ResourceManager1.RegisterIcon(Icon.Error);


                Store store = this.languageId.GetStore();
                store.DataSource = new object[]
                {
                    new object[] { "1", "English" },
                    new object[] { "2", "عربي" },
                    new object[] { "3", "Français" },
                    new object[] { "4", "Deutsch" }
                };

                languageId.HideBaseTrigger = true;
                this.languageId.Call("getTrigger(0).hide");
                languageId.Select(1);
            }
        }
Example #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ResourceManager1.RegisterIcon(Icon.Tick);
     ResourceManager1.RegisterIcon(Icon.Error);
     if (Request.QueryString["timeout"] != null && Request.QueryString["timeout"].ToString() == "yes")
     {
         //lblError.Text = Resources.Common.SessionDisconnected;
     }
     if (!IsPostBack && Request.QueryString["account"] != null)
     {
         tbAccountName.Text = Request.QueryString["account"];
         DirectCheckField(tbAccountName.Text);
     }
     if (!X.IsAjaxRequest)
     {
         ResourceManager1.RegisterIcon(Icon.Tick);
         ResourceManager1.RegisterIcon(Icon.Error);
     }
 }
Example #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Store store = this.languageId.GetStore();

            store.DataSource = new object[]
            {
                new object[] { "1", "English" },
            };

            languageId.HideBaseTrigger = true;
            this.languageId.Call("getTrigger(0).hide");
            languageId.Select(0);

            if (Request.QueryString["timeout"] != null && Request.QueryString["timeout"].ToString() == "yes")
            {
                lblError.Text = Resources.Common.SessionDisconnected;
            }
            ResourceManager1.RegisterIcon(Icon.Tick);
            ResourceManager1.RegisterIcon(Icon.Error);
        }
Example #10
0
        public object DirectCheckField(string value)
        {
            //return true;
            GetAccountRequest request = new GetAccountRequest();

            request.Account = value;

            Response <Account> response = _masterService.GetAccount(request);

            if (response.Success)
            {
                tbAccountName.IndicatorIcon = Icon.Accept;
                ResourceManager1.RegisterIcon(Icon.Accept);
            }
            else
            {
                tbAccountName.IndicatorIcon = Icon.Error;
                ResourceManager1.RegisterIcon(Icon.Error);
            }
            tbAccountName.ShowIndicator();
            return(response.Success);
        }
Example #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsLoggedIn())
        {
            Response.Redirect("Default.aspx", true);
        }

        //set session time remaining
        strMilisecondsSessionExpire = SessionTimeRemaining();
        strSessionTimeout           = SessionTimeRemaining();

        // register Ext.NET library icons
        ResourceManager1.RegisterIcon(Icon.Information);

        //pass the master to the popup
        ucPatLookup.BaseMstr     = this;
        ucLogin.BaseMstr         = this;
        ucVerticalMenu.BaseMstr  = this;
        ucEncounterType.BaseMstr = this;

        if (!this.IsLoggedIn())
        {
            //put us back in login mode
            ucLogin.SetMode(1);

            this.ClosePatient();
        }

        //------------------------------------------------------------------------------
        // Get "Last updated" info
        string strLastUpdated = this.GetVSStringValue("LAST_UPDATED");

        if (!String.IsNullOrEmpty(strLastUpdated))
        {
            divLastModified.Visible   = true;
            divLastModified.InnerText = strLastUpdated;
        }

        //remove PATIENTNAME session variable if
        //not logged in and patient_id is empty
        if (!this.IsLoggedIn() || String.IsNullOrEmpty(this.SelectedPatientID))
        {
            Session["PATIENTNAME"] = null;
        }

        //------------------------------------------------------------------------------
        // NOT POSTBACK
        //------------------------------------------------------------------------------
        #region not_postback
        if (!IsPostBack)
        {
            //get system settings
            DataSet dsSys = new DataSet();

            if (Session["SYSSETTINGS"] == null)
            {
                CSystemSettings sys = new CSystemSettings();
                Session["SYSSETTINGS"] = sys.GetSystemSettingsDS(this);
            }
            dsSys = (DataSet)Session["SYSSETTINGS"];

            //get site
            if (Session["SiteID"] == null)
            {
                CSystemSettings SysSettings = new CSystemSettings();
                DataSet         dsSite      = SysSettings.GetSiteDS(this);
                string          strSiteID   = utils.GetStringValueFromDS(dsSite, "SITE_ID");
                Session["SiteID"] = strSiteID;
            }
        }
        #endregion

        //------------------------------------------------------------------------------
        // IS POSTBACK
        //------------------------------------------------------------------------------
        #region isPostBack
        if (IsPostBack)
        {
            //get the postback control
            string strPostBackControl = Request.Params["__EVENTTARGET"];
            if (strPostBackControl != null)
            {
                #region PatientLookup
                //did we do a patient lookup?
                if (strPostBackControl.Equals("PATIENT_LOOKUP"))
                {
                    //Clears previously looked up patient id, treatment id
                    this.SelectedPatientID   = "";
                    this.SelectedTreatmentID = -1;
                    this.SelectedEncounterID = "";
                    this.SelectedProblemID   = -1;

                    this.ClosePatient();


                    //get the patient id
                    string[] strArg = Request.Form["__EVENTARGUMENT"].Split('|');

                    //pass the patient id to the base, this will cache
                    //it in the db fx_session_value table
                    this.SelectedPatientID = strArg[0];

                    //check if it is an event lookup
                    if (strArg.Length > 1)
                    {
                        if (strArg[1].ToLower().Equals("event"))
                        {
                            Session["EVENT_LOOKUP"] = true;
                        }
                    }

                    //set the current treatment id, gets list of records with newest first
                    DataSet t_recs = treatment.GetRecordList(this,
                                                             this.SelectedPatientID,
                                                             2);  //OPEN CASES - Revamp only uses this

                    if (t_recs != null && t_recs.Tables[0].Rows.Count > 0)
                    {
                        this.SelectedTreatmentID = Convert.ToInt32(t_recs.Tables[0].Rows[0]["treatment_id"].ToString());
                    }

                    //------------------------------------------------------------------------------
                    //GET INITIAL VISIT ID
                    //GET PATIENT NAME FOR THE DEMOGRAPHICS BLURB
                    if (this.IsLoggedIn() && !String.IsNullOrEmpty(this.SelectedPatientID))//must be logged in too...
                    {
                        if (Session["InitialVisit"] == null)
                        {
                            CEncounter patInitVisit = new CEncounter();
                            CDataUtils dUtils       = new CDataUtils();
                            DataSet    dsInitVisit  = patInitVisit.GetInitialVisitDS(this, this.SelectedPatientID, this.SelectedTreatmentID);
                            Session["InitialVisit"] = dUtils.GetStringValueFromDS(dsInitVisit, "encounter_id");
                        }

                        if (Session["PATIENTNAME"] == null)
                        {
                            CPatient cpat = new CPatient();
                            Session["PATIENTNAME"] = cpat.GetPatientName(this);
                        }

                        //GET SELECTED PATIENT'S DEMOGRAPHICS
                        CPatient   pat   = new CPatient();
                        CDataUtils utils = new CDataUtils();
                        DataSet    clientDemographics = new DataSet();

                        Session["PAT_DEMOGRAPHICS_DS"] = pat.GetPatientDemographicsDS(this);
                        clientDemographics             = (DataSet)Session["PAT_DEMOGRAPHICS_DS"];

                        foreach (DataTable patTable in clientDemographics.Tables)
                        {
                            foreach (DataRow patRow in patTable.Rows)
                            {
                                this.APPMaster.PatientHasOpenCase = false;
                                if (!patRow.IsNull("OPENCASE_COUNT"))
                                {
                                    if (Convert.ToInt32(patRow["OPENCASE_COUNT"]) > 0)
                                    {
                                        this.APPMaster.PatientHasOpenCase = true;
                                    }
                                }
                            }
                        }
                    }
                    //--------------------------------------------------------------------------------------

                    //VERIFY STATUS OF THE PATIENT RECORD
                    CPatientLock plock = new CPatientLock(this);

                    string strLockProviderName  = String.Empty;
                    string strLockProviderEmail = String.Empty;

                    this.IsPatientLocked         = plock.IsPatientLocked(this.SelectedPatientID, out strLockProviderName, out strLockProviderEmail);
                    Session["PAT_LOCK_PROVIDER"] = strLockProviderName;
                    Session["PAT_LOCK_EMAIL"]    = strLockProviderEmail;

                    //REDIRECT USER ------------------------------------------------------------------------
                    long lSoapNoteUR = (long)SUATUserRight.NoteSubjectiveUR
                                       + (long)SUATUserRight.NoteObjectiveUR
                                       + (long)SUATUserRight.NoteAssessmentUR
                                       + (long)SUATUserRight.NotePlanUR;


                    if (this.APPMaster.HasUserRight(lSoapNoteUR))
                    {
                        Response.Redirect("pat_summary.aspx", true);
                    }
                    else if (this.APPMaster.HasUserRight((long)SUATUserRight.ProcessNewPatientsUR))
                    {
                        Response.Redirect("pat_demographics.aspx", false);
                    }
                    else
                    {
                        Response.Redirect("revamp.aspx", true);
                    }
                }
                #endregion

                #region OtherLookups
                //did we do a user lookup?
                if (strPostBackControl.Equals("USER_LOOKUP"))
                {
                    //get the uidpwd
                    string strArg = Request.Form["__EVENTARGUMENT"];
                    //pass the patient id to the base, this will cache
                    //it in the db fx_session_value table
                    this.SelectedProviderID = strArg;

                    Response.Redirect("user_admin.aspx", true);
                }

                //did we do a Portal Patient Lookup?
                if (strPostBackControl.Equals("PORTAL_PATIENT_LOOKUP"))
                {
                    //get the uidpwd
                    string strArg = Request.Form["__EVENTARGUMENT"];
                    //pass the patient id to the base, this will cache
                    //it in the db fx_session_value table
                    this.SelectedPatientID = strArg;

                    Response.Redirect("pat_portal_account.aspx", true);
                }

                //-- 2/22/2011 close currently looked up patient
                if (strPostBackControl.Equals("CLOSE_PATIENT"))
                {
                    this.SelectedPatientID   = "";
                    this.SelectedTreatmentID = -1;
                    this.LookupSearchCase    = -1;

                    Response.Redirect("revamp.aspx", true);
                }
                #endregion
            }
        }
        #endregion

        #region ShowUsernameAndPatientDemographics
        if (this.IsLoggedIn())
        {
            //Name Of User Currently logged on.
            string strUserLoggedOn = String.Empty;
            if (Session["USERLOGGEDON"] == null)
            {
                strUserLoggedOn        += "<img alt=\"Account Activity\" src=\"Images/information.png\" style=\"cursor: pointer; vertical-align: middle; margin-right: 3px;\" onclick=\"showAccDetails();\" />";
                strUserLoggedOn        += UserLoggedOn();
                strUserLoggedOn        += " - ";
                strUserLoggedOn        += DateTime.Now.ToShortDateString();
                strUserLoggedOn        += " ";
                strUserLoggedOn        += DateTime.Now.ToShortTimeString();
                lblUserLoggedOn.Text    = strUserLoggedOn;
                Session["USERLOGGEDON"] = strUserLoggedOn;
            }
            else
            {
                lblUserLoggedOn.Text = Session["USERLOGGEDON"].ToString();
            }

            //draw the patient info bar at the top
            patDemoInfoBar.InnerHtml = "";

            //GET PATIENT NAME for the demographics blurb
            //Render Left Vertical Menu for selected patient
            if (this.IsLoggedIn() && !String.IsNullOrEmpty(this.SelectedPatientID))//must be logged in too...
            {
                if (Session["PATIENTNAME"] == null)
                {
                    CPatient cpat = new CPatient();
                    Session["PATIENTNAME"] = cpat.GetPatientName(this);
                }
                string[] strPatInfo = (string[])Session["PATIENTNAME"];

                patDemoInfoBar.InnerHtml = strPatInfo[0];

                //render vertical menu
                ucVerticalMenu.RenderVerticalMenu();
            }
            else
            {
                this.ClosePatient();
            }
        }
        #endregion

        //load the patient treatment/encounter info
        //if we are in group note, hide it...

        bool   bSkipSelectedPatientCheck = false;
        string strPage = "";
        strPage = this.GetPageName().ToLower();
        if (strPage.IndexOf("pat_portal_account.aspx") > -1)
        {
            pnlTxTree.Visible         = false;
            bSkipSelectedPatientCheck = true;
        }
        else if (strPage.IndexOf("cms_menu_edit.aspx") > -1)
        {
            pnlTxTree.Visible         = false;
            bSkipSelectedPatientCheck = true;

            if (IsPostBack)
            {
                if (this.OnMasterSAVE())
                {
                    BuildMenu();
                }
            }
        }
        else if (strPage.IndexOf("cms_page_edit.aspx") > -1)
        {
            pnlTxTree.Visible         = false;
            bSkipSelectedPatientCheck = true;
        }
        else
        {
            pnlTxTree.Visible         = true;
            patDemoInfoBar.Visible    = true;
            bSkipSelectedPatientCheck = false;
        }

        // ----------------
        if (!bSkipSelectedPatientCheck)
        {
            if (!String.IsNullOrEmpty(this.SelectedPatientID))
            {
                pnlTxTree.Visible      = true;
                pnlDemoInfoBar.Visible = true;
            }
            else
            {
                pnlTxTree.Visible      = false;
                pnlDemoInfoBar.Visible = false;
            }
        }

        if (!this.IsLoggedIn())
        {
            pnlLogoff.Visible = false;
        }
        else
        {
            pnlLogoff.Visible = true;
        }

        //get account activity details
        GetAccountDetails();

        // Build the Menu & Toolbar HTML string
        BuildMenu();

        //check if user has new messages
        btnEmailNew.Attributes.CssStyle.Add("vertical-align", "middle");
        btnEmailNew.Attributes.CssStyle.Add("margin-right", "8px");
        btnEmailNew.Attributes.CssStyle.Add("cursor", "pointer");
        btnEmailNew.Visible = this.HasNewMessage();
        btnEmailNew.Attributes.Add("onclick", "winrpt.showReport('messagescenter',['null'],{maximizable:false, width:($(window).width() - 50), height:($(window).height() - 50)});");
    }
Example #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
            {
                #region Oturum Yoksa Postala
                Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa(), false);
                Context.ApplicationInstance.CompleteRequest();
                return;

                #endregion
            }
            else
            {
                DateTime Giris;

                #region Son Giriş Zamanı Al
                using (BaglantiCumlesi db = new BaglantiCumlesi())
                {
                    int PID = Class.Fonksiyonlar.Admin.Genel.AdminID();
                    var SQL = (from p in db.tbl_islemler
                               where p.admin_id == PID
                               orderby p.tarih descending
                               select p.tarih).Skip(2).AsEnumerable().Take(1);

                    Giris = SQL.Select(x => x.Value).FirstOrDefault();
                }
                #endregion

                #region Son Giriş Zamanından Beri Geçen Zamanı Hesapla
                DateTime Simdi = DateTime.Now;

                string sonuc = null;

                double gun    = (Simdi - Giris).TotalDays;
                double saat   = (Simdi.Hour - Giris.Hour);
                double dakika = (Simdi.Minute - Giris.Minute);

                if ((int)gun >= 1)
                {
                    sonuc = sonuc + ((int)gun).ToString() + " gün ";
                }

                if ((int)saat >= 1)
                {
                    sonuc = sonuc + ((int)saat).ToString() + " saat ";
                }

                sonuc = sonuc + ((int)dakika).ToString() + " dak. önce ";
                #endregion

                #region Son Giriş Bilgileri
                LinkButton1.Text = "Son Giriş : " + Giris.ToString() + " - " + sonuc;
                #endregion

                #region Yardım sayfası
                LinkButton4.Text        = "Yardım";
                LinkButton4.NavigateUrl = "http://yardim.zirvedns.com";
                LinkButton4.Target      = "_blank";
                #endregion

                #region Site önizleme
                LinkButton5.Text        = "Site Önizleme";
                LinkButton5.NavigateUrl = "/";
                LinkButton5.Target      = "_blank";
                #endregion

                #region Hoşgeldin Olayı
                Label1.Text = "Hoşgeldin  Sn. (" + Class.Fonksiyonlar.Admin.Kullanici.Cagir.KullaniciAdi(Class.Fonksiyonlar.Admin.Genel.AdminID()) + ") " + Class.Fonksiyonlar.Admin.Kullanici.Cagir.AdSoyad(Class.Fonksiyonlar.Admin.Genel.AdminID());
                #endregion

                #region Shop mu, vitrin mi?
                if (!Class.Fonksiyonlar.Firma.Ayar().Select(p => p.type).FirstOrDefault())
                {
                    LabelShop.Text = "VİTRİN";
                    LabelShop.Icon = Icon.CartError;
                }
                else
                {
                    LabelShop.Text = "SHOP";
                    LabelShop.Icon = Icon.Cart;
                }
                #endregion

                //Button -> Button.Menu -> Menu -> ComponentMenui -> ComponentMenui.Component ->
                //Container -> Container.is -> MenuPanel -> MenuPanel.Menu -> MenuPanel.Menu.is ->
                //Menui -> MenuSeparator

                //<ext:Button ID="Button2" runat="server" Text="Products">
                //<Menu>
                //<ext:Menu ID="Menu1" runat="server" ShowSeparator="false">
                //<is>
                //<ext:ComponentMenui ID="ComponentMenui1" runat="server" Shift="false">
                //<Component>
                //<ext:Container ID="Container1" runat="server" AutoWidth="true" AutoHeight="true"
                //AnchorVertical="100%" Layout="ColumnLayout">
                //<is>
                //<ext:MenuPanel ID="MenuPanel2" runat="server" Title="Laptop" Margins="10 10 10 10">
                //<Menu ID="Menu3" runat="server" ShowSeparator="false">
                //<is>
                //<ext:Menui ID="Menui1" runat="server" Text="Navigation Link" Icon="PackageGreen" />
                //<ext:MenuSeparator ID="MenuSeparator1" runat="server" />

                /*
                 * //Katman 0
                 * Ext.Net.Button B = new Ext.Net.Button();
                 * B.ID = "Button2";
                 * B.Text = "Products";
                 *
                 * Ext.Net.Menu M = new Ext.Net.Menu();
                 * M.ID = "Menu1";
                 * M.ShowSeparator = false;
                 *
                 * Ext.Net.ComponentMenuItem CMI = new Ext.Net.ComponentMenuItem();
                 * CMI.ID = "ComponentMenui1";
                 * CMI.Shift = false;
                 *
                 * Ext.Net.Container C = new Ext.Net.Container();
                 * C.ID = "Container1";
                 * C.AutoWidth = true;
                 * C.AutoHeight = true;
                 * C.AnchorVertical = "100%";
                 * C.Layout = "ColumnLayout";
                 *
                 * //Katman 1
                 * Ext.Net.MenuPanel MP = new Ext.Net.MenuPanel();
                 * MP.ID = "MenuPanel2";
                 * MP.Title = "Laptop";
                 * MP.Margins = "10 10 10 10";
                 * MP.Menu.ID = "Menu3";
                 * MP.Menu.ShowSeparator = false;
                 *
                 #region Child Menu
                 * //Katman 1-1
                 * Ext.Net.MenuItem MI = new Ext.Net.MenuItem();
                 * MI.ID = "Menui1";
                 * MI.Text = "Navigation Link";
                 * MI.Icon = Ext.Net.Icon.PackageGreen;
                 #endregion
                 *
                 #region Separator
                 * Ext.Net.MenuSeparator MS = new Ext.Net.MenuSeparator();
                 * MS.ID = "MenuSeparator1";
                 #endregion
                 *
                 * MP.Menu.Items.Add(MI);
                 * MP.Menu.Items.Add(MS);
                 * C.Items.Add(MP);
                 * CMI.Component.Add(C);
                 * M.Items.Add(CMI);
                 * B.Menu.Add(M);
                 * MenuToolbar.Items.Add(B);
                 */

                #region Icon Register Olayı
                if (!IsPostBack)
                {
                    ResourceManager1.RegisterIcon(Ext.Net.Icon.Cup);
                    ResourceManager1.RegisterIcon(Ext.Net.Icon.StarGold);
                }
                #endregion

                OnlineDurumlari();

                Test();
            }
        }
Example #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region Oturum Kontrol
        if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
        {
            #region Oturum Yoksa Postala
            Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa());
            return;

            #endregion
        }
        else
        {
            #region Firma Logosu
            ImageButton1.ImageUrl     = "images/logo.png";
            ImageButton1.AutoPostBack = true;
            ImageButton1.PostBackUrl  = "panel.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond);
            #endregion

            DateTime Giris;

            #region Son Giriş Zamanı Al
            using (BaglantiCumlesi SME = new BaglantiCumlesi())
            {
                int PID = Class.Fonksiyonlar.Admin.Genel.AdminID();
                var SQL = (from p in SME.tbl_giris_cikislar
                           where p.admin_id == PID
                           orderby p.tarih descending
                           select p.tarih).Skip(2).Take(1);

                Giris = SQL.Select(x => x.Value).FirstOrDefault();
            }
            #endregion

            #region Son Giriş Zamanından Beri Geçen Zamanı Hesapla
            DateTime Simdi = DateTime.Now;

            string sonuc = null;

            double gun    = (Simdi - Giris).TotalDays;
            double saat   = (Simdi.Hour - Giris.Hour);
            double dakika = (Simdi.Minute - Giris.Minute);

            if ((int)gun >= 1)
            {
                sonuc = sonuc + ((int)gun).ToString() + " gün ";
            }

            if ((int)saat >= 1)
            {
                sonuc = sonuc + ((int)saat).ToString() + " saat ";
            }

            sonuc = sonuc + ((int)dakika).ToString() + " dak. önce ";
            #endregion

            #region Son Giriş Bilgileri
            LinkButton1.Text = "Bir Önceki Giriş Zamanı : " + Giris.ToString() + " - " + sonuc;
            #endregion

            #region Hoşgeldin Olayı
            Label1.Text = "Hoşgeldin  Sn. (" + Class.Fonksiyonlar.Admin.Kullanici.Cagir.KullaniciAdi(Class.Fonksiyonlar.Admin.Genel.AdminID()) + ") " + Class.Fonksiyonlar.Admin.Kullanici.Cagir.AdSoyad(Class.Fonksiyonlar.Admin.Genel.AdminID());
            #endregion

            #region Status Bar
            if (!Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Root(Class.Fonksiyonlar.Admin.Genel.AdminID()))
            {
                StatusBar1.Visible = false;
            }
            else
            {
                Label1.Visible = false;

                var SQL = (from p in Objeler.Listeler.Admin
                           where p.SessionID == Session.SessionID
                           select new { p.Tarih }).FirstOrDefault().Tarih;

                StatusBar1.Text  = SQL.ToString();
                BottomLabel.Text = BottomLabel.Text + " - (" + Class.Fonksiyonlar.Admin.Kullanici.Cagir.KullaniciAdi(Class.Fonksiyonlar.Admin.Genel.AdminID()) + ") " + Class.Fonksiyonlar.Admin.Kullanici.Cagir.AdSoyad(Class.Fonksiyonlar.Admin.Genel.AdminID());
            }
            #endregion
        }
        #endregion

        #region Icon Register Olayı
        if (!IsPostBack)
        {
            ResourceManager1.RegisterIcon(Icon.Cup);
            ResourceManager1.RegisterIcon(Icon.Table);
        }
        #endregion
    }
Example #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //doesn't cache the page so users cannot back into sensitive information after logging off
        //Response.AddHeader("X-UA-Compatible", "IE=9");
        //Response.Cache.SetAllowResponseInBrowserHistory(false);
        //Response.Cache.SetCacheability(HttpCacheability.NoCache);
        //Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
        //Response.Cache.SetNoStore();
        //Response.AddHeader("Pragma", "no-cache");

        //loads version
        lblVersion.Text = ConfigurationManager.AppSettings["Version"];

        //set session time remaining
        strMilisecondsSessionExpire = SessionTimeRemaining();
        strSessionTimeout           = SessionTimeRemaining();

        // register Ext.NET library icons
        ResourceManager1.RegisterIcon(Icon.Information);

        if (!IsPostBack)
        {
            //get site
            if (Session["SiteID"] == null)
            {
                CSystemSettings SysSettings = new CSystemSettings();
                DataSet         dsSite      = SysSettings.GetSiteDS(this);
                string          strSiteID   = utils.GetStringValueFromDS(dsSite, "SITE_ID");
                Session["SiteID"] = strSiteID;
            }
        }


        //------------------------------------------------------------------------------
        // IS POSTBACK
        //------------------------------------------------------------------------------
        #region isPostBack
        if (IsPostBack)
        {
            //get the postback control
            string strPostBackControl = Request.Params["__EVENTTARGET"];
            if (strPostBackControl != null)
            {
            }
        }
        #endregion

        #region ShowUsernameAndPatientDemographics
        if (this.IsLoggedIn())
        {
            //Name Of User Currently logged on.
            string strLoginDateTime = String.Empty;
            if (Session["LOGINDATETIME"] == null)
            {
                strLoginDateTime        += DateTime.Now.ToShortDateString();
                strLoginDateTime        += " ";
                strLoginDateTime        += DateTime.Now.ToShortTimeString();
                Session["LOGINDATETIME"] = strLoginDateTime;
            }

            string strUserLoggedOn = String.Empty;
            if (Session["USERLOGGEDON"] == null)
            {
                strUserLoggedOn += "<img alt=\"Account Activity\" src=\"Images/information.png\" style=\"cursor: pointer; vertical-align: middle; margin-right: 3px;\" onclick=\"showAccDetails();\" />";
                strUserLoggedOn += UserLoggedOn();
                strUserLoggedOn += " - ";
                strUserLoggedOn += Session["LOGINDATETIME"].ToString();

                lblUserLoggedOn.Text    = strUserLoggedOn;
                Session["USERLOGGEDON"] = strUserLoggedOn;
            }
            else
            {
                lblUserLoggedOn.Text = Session["USERLOGGEDON"].ToString();
            }

            //draw the patient info bar at the top
            //patDemoInfoBar.InnerHtml = "";
        }
        #endregion

        string strPage = this.GetPageName().ToLower();

        if (!this.IsLoggedIn())
        {
            pnlLogoff.Visible = false;
        }
        else
        {
            pnlLogoff.Visible = true;
        }

        //get account activity details
        GetAccountDetails();

        // Build the Menu & Toolbar HTML string
        BuildMenu();

        //check if user has new messages
        btnEmailNew.Attributes.CssStyle.Add("vertical-align", "middle");
        btnEmailNew.Attributes.CssStyle.Add("margin-right", "8px");
        btnEmailNew.Visible = this.HasNewMessage();
    }
Example #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && !X.IsAjaxRequest && !string.IsNullOrEmpty(Request.QueryString["param"]))
            {
                bool success = HandleExternalUrl();
                if (!success)
                {
                    Response.Redirect("Login.aspx?timeout=yes", true);
                }
            }
            try
            {
                if (CheckSession() == "0")
                {
                    Logout();
                }
            }
            catch
            {
                Logout();
            }
            if (!_systemService.SessionHelper.CheckUserLoggedIn())
            {
                switch (_systemService.SessionHelper.getLangauge())
                {
                case "1":
                    Response.Redirect("Login.aspx?timeout=yes", true);
                    break;

                case "2":
                    Response.Redirect("ARLogin.aspx?timeout=yes", true);
                    break;

                case "3":
                    Response.Redirect("FRLogin.aspx?timeout=yes", true);
                    break;

                case "4":
                    Response.Redirect("DELogin.aspx?timeout=yes", true);
                    break;

                default: Response.Redirect("Login.aspx?timeout=yes", true);
                    break;
                }
            }

            //if (!X.IsAjaxRequest)
            //{
            //    this.ResourceManager1.DirectEventUrl = this.Request.Url.AbsoluteUri;
            //}
            //this.ResourceManager1.DirectEventUrl = this.ResourceManager1.DirectEventUrl.Replace("http", "https");
            if (!IsPostBack && !X.IsAjaxRequest)
            {
                if (!X.IsAjaxRequest)
                {
                    ResourceManager1.RegisterIcon(Icon.Tick);
                    ResourceManager1.RegisterIcon(Icon.Error);

                    Store store = this.languageId.GetStore();
                    store.DataSource = new object[]
                    {
                        new object[] { "1", "English" },
                    };
                }
                languageId.HideBaseTrigger = true;
                this.languageId.Call("getTrigger(0).hide");
                switch (_systemService.SessionHelper.getLangauge())
                {
                case "en": languageId.Select(0);
                    break;

                case "ar": languageId.Select(1);
                    break;

                case "fr":
                    languageId.Select(2);
                    break;

                case "de":
                    languageId.Select(3);
                    break;
                }
                SetExtLanguage();
                SetHeaderStyle();
                CompanyNameLiteral.Text = "" + _systemService.SessionHelper.Get("CompanyName").ToString();
                username.Text           = _systemService.SessionHelper.Get("CurrentUserName").ToString();
                //Building the tree
                _systemService.SessionHelper.Set("ActiveModule", "-1");

                transactionDate.Format = _systemService.SessionHelper.GetDateformat() + ", hh:mm:ss";
                if (string.IsNullOrEmpty(activeModule.Text))
                {
                    activeModule.Text = "7";
                }
                //TryRegister();

                if (string.IsNullOrEmpty(_systemService.SessionHelper.GetEmployeeId()))
                {
                    btnSelfService.Disabled = true;
                }
                if (_systemService.SessionHelper.GetUserType() == 4)
                {
                    b1.Hidden = true;
                    btnAdminAffairs.Hidden = btnCompany.Hidden = btnEmployeeFiles.Hidden = btnPayroll.Hidden = btnReport.Hidden = btnScheduler.Hidden = true;
                    sep1.Hidden            = sep2.Hidden = sep3.Hidden = sep4.Hidden = true;
                    BuildTree(7);
                }
                else
                {
                    BuildTree(1);
                }

                DefaultTabCloseMenu.CloseAllTabsText    = GetGlobalResourceObject("Common", "CloseAllTabsText").ToString();
                DefaultTabCloseMenu.CloseOthersTabsText = GetGlobalResourceObject("Common", "CloseOthersTabsText").ToString();
                DefaultTabCloseMenu.CloseTabText        = GetGlobalResourceObject("Common", "CloseTabText").ToString();
                X.Call("refreshPage");
            }
        }