Пример #1
0
 protected void cmdSignOut_ServerClick(object sender, System.EventArgs e)
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!YZAuthHelper.IsAuthenticated)
        {
            string token = this.Request.QueryString["Token"];
            if (!String.IsNullOrEmpty(token))
            {
                using (SqlConnection cn = new SqlConnection())
                {
                    cn.ConnectionString = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["BPMDB"].ConnectionString;
                    cn.Open();

                    using (SqlCommand cmd = new SqlCommand())
                    {
                        cmd.Connection  = cn;
                        cmd.CommandText = "SELECT StepID,Account,hash FROM BPMInstProcessToken WHERE Token=@Token";
                        cmd.Parameters.Add("@Token", SqlDbType.NVarChar).Value = token;

                        using (DBReader reader = new DBReader(cmd.ExecuteReader()))
                        {
                            if (reader.Read())
                            {
                                int    stepid      = Int32.Parse(this.Request.QueryString["pid"]);
                                int    stepidSaved = reader.ReadInt32(0);
                                string account     = reader.ReadString(1);
                                string hash        = reader.ReadString(2);

                                if (stepid == stepidSaved)
                                {
                                    List <string> values = new List <string>();
                                    values.Add(token);
                                    values.Add(stepid.ToString());
                                    values.Add(account);

                                    if (YZSecurityHelper.CheckHash(values, hash, YZSecurityHelper.SecurityKey))
                                    {
                                        YZAuthHelper.SetAuthCookie(account);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }

        if (!YZAuthHelper.IsAuthenticated)
        {
            FormsAuthentication.RedirectToLoginPage();
            return;
        }

        int pid = Int32.Parse(this.Request["pid"]);

        BPM.Client.ProcessInfo processInfo;

        using (BPMConnection cn = new BPMConnection())
        {
            cn.WebOpen();

            //如果是共享任务,表单打开时直接获取共享任务
            //BPMProcStep step = BPMProcStep.Load(cn,pid);
            //if (step.Share)
            //    BPMProcStep.PickupShareStep(cn, pid);

            processInfo = BPMProcess.GetProcessInfo(cn, pid);
        }

        if (String.IsNullOrEmpty(processInfo.FormFile))
        {
            throw new Exception(Resources.YZStrings.Aspx_Process_MissForm);
        }
        else
        {
            YZUrlBuilder urlBuilder = YZUtility.GetFormRedirectUrl(this.Page, processInfo.FormFile);
            this.Response.Redirect(urlBuilder.ToString(), true);
        }
    }
Пример #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session.Abandon();
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #4
0
 protected void lbLogout_Click(object sender, EventArgs e)
 {
     Session["user"] = false;
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #5
0
 public ActionResult LogOff()
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
     return(RedirectToAction("Login"));
 }
Пример #6
0
 protected void MasterLoginStatus_LoggedOut(object sender, EventArgs e)
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage("~/Default.aspx");
 }
Пример #7
0
 /// <summary>
 /// Metoda wywoływane przez naciśnięcie przycisku zaloguj.
 /// </summary>
 /// <param name="sender">obiekt wywołujący.</param>
 /// <param name="e">The <see cref="EventArgs"/> Obiekt przechowujący dane wydarzenia.</param>
 protected void Zaloguj(object sender, EventArgs e)
 {
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #8
0
 private static void LogOut()
 {
     BUser.ClearUserCach();
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Charset = "UTF-8";
        Response.AddHeader("P3P", "CP=CAO PSA OUR"); //无此行当在ie的iframe中打开应用(default.aspx.cs)时设置cookie后,ajax request时cookie没了
        this.Response.Cache.SetCacheability(HttpCacheability.NoCache);

        if (!YZAuthHelper.IsAuthenticated)
        {
            FormsAuthentication.RedirectToLoginPage();
            return;
        }

        //设置页标题
        this.Page.Title = System.Web.Configuration.WebConfigurationManager.AppSettings["CompanyInfoDefaultPageTitle"];
        if (String.IsNullOrEmpty(this.Page.Title))
        {
            this.Page.Title = Resources.YZStrings.Aspx_DefaultPage_Title;
        }

        //设置HTML标准
        if (String.Compare(this.Request.Browser.Browser, "IE", true) == 0 && this.Request.Browser.MajorVersion == 6)
        {
        }
        else
        {
            this._litTop.Text = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
        }

        //没有site参数,或site参数不正确
        int factoryId = 0;

        Int32.TryParse(this.Request.QueryString["site"], out factoryId);

        //获得帐号信息
        User user = new User();
        int  taskCount;
        int  userLevel = 10;
        bool permSys   = false;
        bool leave     = false;

        using (BPMConnection cn = new BPMConnection())
        {
            cn.WebOpen();

            //获得当前用户
            user.Open(cn, YZAuthHelper.LoginUserAccount);
            taskCount = cn.GetMyTaskCount(null);
            UserCommonInfo userCommonInfo = UserCommonInfo.FromAccount(cn, YZAuthHelper.LoginUserAccount);

            MemberCollection positions = OrgSvr.GetUserPositions(cn, YZAuthHelper.LoginUserAccount);
            foreach (Member member in positions)
            {
                if (member.Level > userLevel)
                {
                    userLevel = (int)member.Level;
                }
            }

            //检查对系统管理模块的权限
            permSys = UserResourceSecurityManager.CheckPermision(cn, YZWellKnowRSID.SYS, "Execute");
            leave   = userCommonInfo.OutOfOfficeState == OutOfOfficeState.InOffice ? false:true;
        }

        JsonItem rv = new JsonItem();

        rv.Attributes["LCID"]               = YZLangHelper.CurrentCulture.LCID;
        rv.Attributes["CompanyName"]        = System.Web.Configuration.WebConfigurationManager.AppSettings["CompanyInfoCompanyName"];
        rv.Attributes["Account"]            = YZAuthHelper.LoginUserAccount;
        rv.Attributes["DisplayName"]        = user.DisplayName;
        rv.Attributes["TaskCount"]          = taskCount;
        rv.Attributes["UserLevel"]          = userLevel;
        rv.Attributes["PermSys"]            = permSys;
        rv.Attributes["Leave"]              = leave;
        rv.Attributes["Link1"]              = System.Web.Configuration.WebConfigurationManager.AppSettings["CompanyInfoLink1"];
        rv.Attributes["DBType"]             = QueryManager.DBProviderName != "SQL Server" ? QueryManager.DBProviderName : "";
        rv.Attributes["UnreadMessageCount"] = 0;

        //获得rootUrl
        string url         = this.Request.Url.GetLeftPart(UriPartial.Authority);
        string virtualPath = HttpRuntime.AppDomainAppVirtualPath;

        if (virtualPath == "/")
        {
            virtualPath = String.Empty;
        }

        url = url + virtualPath + "/";

        //在页面中包含JS
        string             jscode = String.Format("var rootUrl='{0}';\nvar userInfo = {1}", url, rv.ToString());
        HtmlGenericControl js     = new HtmlGenericControl("script");

        js.Attributes["type"] = "text/javascript";
        js.InnerHtml          = jscode;
        this.Page.Header.Controls.AddAt(1, js);

        //设置Cookie
        HttpCookie cookie;

        cookie = new HttpCookie("UserDisplayName", HttpUtility.UrlEncode(Convert.ToString(rv.Attributes["DisplayName"]), System.Text.Encoding.UTF8));
        this.Response.SetCookie(cookie);
        cookie = new HttpCookie("UserLevel", userLevel.ToString());
        this.Response.SetCookie(cookie);

        string startApp = this.Request.QueryString["StartApp"];

        if (String.IsNullOrEmpty(startApp))
        {
            startApp = System.Web.Configuration.WebConfigurationManager.AppSettings["StartApp"];
        }
        if (String.IsNullOrEmpty(startApp))
        {
            startApp = "YZApp";
        }

        this._litStartApp.Text    = String.Format("<script src=\"{0}/MainWindow.js\" type=\"text/javascript\"></script>", startApp);
        this._litStartAppCss.Text = String.Format("<link href=\"{0}/Styles/main.css\" rel=\"stylesheet\" type=\"text/css\" />", startApp);
    }
Пример #10
0
        protected override void OnLoad(EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (GetAttributeValue("Manual").AsBoolean())
                {
                    ShowManual();
                }
                else
                {
                    if (CurrentUser == null && (PageParameter("KioskName").IsNotNullOrWhiteSpace() || PageParameter("datetime").IsNotNullOrWhiteSpace()))
                    {
                        var site = RockPage.Layout.Site;
                        if (site.LoginPageId.HasValue)
                        {
                            site.RedirectToLoginPage(true);
                        }
                        else
                        {
                            FormsAuthentication.RedirectToLoginPage();
                        }
                    }
                    else if (PageParameter("KioskName").IsNotNullOrWhiteSpace())
                    {
                        SetKiosk(PageParameter("KioskName"));
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(upContent, upContent.GetType(), "GetClient", "setTimeout(function(){getClientName()},100);", true);
                    }
                }
            }
            else
            {
                if (GetAttributeValue("Manual").AsBoolean())
                {
                    return;
                }

                if (Request["__EVENTTARGET"] == "ClientName")
                {
                    //Use Kiosk given client name
                    SetKiosk(Request["__EVENTARGUMENT"]);
                }
                else if (Request["__EVENTTARGET"] == "UseDNS")
                {
                    //if the Javascript request throws an error
                    //try to get kiosk name via Javascript
                    try
                    {
                        var ip = Rock.Web.UI.RockPage.GetClientIpAddress();
                        SetKiosk(System.Net.Dns.GetHostEntry(ip).HostName);
                    }
                    catch
                    {
                        ltDNS.Text      = "Unable to determine device name.";
                        pnlMain.Visible = true;
                    }
                }
                else
                {
                    ScriptManager.RegisterStartupScript(upContent, upContent.GetType(), "GetClient", "setTimeout(function(){getClientName()},100);", true);
                }
            }
        }
Пример #11
0
 static void RedirectToLoginPage(HttpContext context)
 {
     FormsAuthentication.RedirectToLoginPage();
     context.Response.End();
 }
Пример #12
0
        public bool Impersonate()
        {
            if (HAP.Web.Configuration.hapConfig.Current.AD.AuthenticationMode == Web.Configuration.AuthMode.Forms)
            {
                if (string.IsNullOrEmpty(this.Password) && HttpContext.Current.Request.Cookies["token"] != null)
                {
                    try { this.Password = TokenGenerator.ConvertToPlain(HttpContext.Current.Request.Cookies["token"].Value); }
                    catch { this.Password = HttpContext.Current.Request.Cookies["token"].Value; return(false); }
                }
            }
            if (HAP.Web.Configuration.hapConfig.Current.AD.AuthenticationMode == Web.Configuration.AuthMode.Windows)
            {
                if (ADUtils.RevertToSelf())
                {
                    ContainedImpersonationContext = ((WindowsIdentity)HttpContext.Current.User.Identity).Impersonate();
                    return(true);
                }
                return(false);
            }

            WindowsIdentity tempWindowsIdentity;
            IntPtr          token          = IntPtr.Zero;
            IntPtr          tokenDuplicate = IntPtr.Zero;

            if (ADUtils.RevertToSelf())
            {
                if (string.IsNullOrEmpty(this.Password) && HttpContext.Current.Request.Cookies["token"] == null)
                {
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage("error=timeout");
                }
                else
                {
                    if (ADUtils.LogonUserA(this.UserName, this.DomainName, this.Password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, ref token) != 0)
                    {
                        if (ADUtils.DuplicateToken(token, 2, ref tokenDuplicate) != 0)
                        {
                            tempWindowsIdentity  = new WindowsIdentity(tokenDuplicate);
                            impersonationContext = tempWindowsIdentity.Impersonate();
                            if (impersonationContext != null)
                            {
                                ADUtils.CloseHandle(token);
                                ADUtils.CloseHandle(tokenDuplicate);
                                return(true);
                            }
                        }
                    }
                    else
                    {
                        throw new Exception("I cannot impersonate " + this.UserName + " due to an issue logging onto the domain " + this.DomainName + " using an Interactive Login.  HAP+ Requires Interactive Login Rights on the Server it is running on");
                    }
                }
            }
            if (token != IntPtr.Zero)
            {
                ADUtils.CloseHandle(token);
            }
            if (tokenDuplicate != IntPtr.Zero)
            {
                ADUtils.CloseHandle(tokenDuplicate);
            }
            return(false);
        }
Пример #13
0
 /// <summary>
 /// Redirect to user to the login page.
 /// </summary>
 public static void RedirectToLogin()
 {
     // Create the form authenticate cookie.
     FormsAuthentication.RedirectToLoginPage();
 }
 public void redirectToLoginPage()
 {
     System.Web.Security.FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #15
0
 protected void LinkButton1_Click(object sender, EventArgs e)
 {
     FormsAuthentication.SignOut();
     Session.Abandon();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #16
0
        /// <summary>
        /// Metoda wywoływana podczas uruchamiania strony.
        /// </summary>
        /// <param name="sender">Źródło wydarzenia.</param>
        /// <param name="e">The <see cref="EventArgs"/> Obiekt przechowujący dane wydarzenia.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["client"] == null)
            {
                FormsAuthentication.RedirectToLoginPage();
                return;
            }
            else if (!IsPostBack && !IsCallback)
            {
                RestClient    client    = (RestClient)Session["client"];
                var           request2  = new RestRequest("/api/monitoring/device/components/version", Method.GET);
                IRestResponse response2 = client.Execute(request2);

                var     content = response2.Content;
                dynamic stuff   = JsonConvert.DeserializeObject(content);
                Label1.Text = "Urządzenie jest uruchmione od: " + (float)stuff.upTimeinSeconds / 60 + " minut";
                Label2.Text = "Wersja systemu: " + stuff.asaVersion;
                Label3.Text = "Tryb firewalla: " + stuff.firewallMode;

                request2  = new RestRequest("/api/monitoring/clock", Method.GET);
                response2 = client.Execute(request2);

                content           = response2.Content;
                stuff             = JsonConvert.DeserializeObject(content);
                LabelGodzina.Text = "Ustawiona data: " + stuff.date + "  " + stuff.time;
                var           request4  = new RestRequest("/api/interfaces/physical", Method.GET);
                IRestResponse response4 = client.Execute(request4);
                content = response4.Content;
                Interfejs interfejsy = JsonConvert.DeserializeObject <Interfejs>(content);


                if (interfejsy != null && interfejsy.items != null)
                {
                    foreach (var item in interfejsy.items)
                    {
                        var           request5  = new RestRequest("api/monitoring/ipaddress/", Method.GET);
                        IRestResponse response5 = client.Execute(request5);
                        content = response5.Content;
                        Interfejs2 interfejsyZIp = JsonConvert.DeserializeObject <Interfejs2>(content);

                        TableRow  tRow      = new TableRow();
                        TableCell interfejs = new TableCell();
                        TableCell ip        = new TableCell();
                        TableCell maska     = new TableCell();
                        TableCell mtu       = new TableCell();
                        TableCell status    = new TableCell();
                        TableCell ccl       = new TableCell();

                        interfejs.Text = item.hardwareID;
                        ip.Text        = " ";
                        maska.Text     = " ";

                        if (interfejsyZIp != null && interfejsyZIp.items != null)
                        {
                            foreach (var inter in interfejsyZIp.items)
                            {
                                if (inter.interfejs.objectId == item.objectId)
                                {
                                    ip.Text    = inter.ipAddress;
                                    maska.Text = inter.netmask;
                                    ccl.Text   = string.Format("<span class='{0}'></span>", inter.isClusterInterface == false ? "glyphicon glyphicon-remove-circle text-danger" : "glyphicon glyphicon-ok-circle text-success");
                                }
                            }
                        }


                        mtu.Text    = item.mtu.ToString();
                        status.Text = string.Format("<span class='{0}'></span>", item.shutdown.ToString() == "False" ? "glyphicon glyphicon-arrow-up text-success" : "glyphicon glyphicon-arrow-down text-danger");
                        tRow.Cells.Add(interfejs);
                        tRow.Cells.Add(ip);
                        tRow.Cells.Add(maska);
                        tRow.Cells.Add(mtu);
                        tRow.Cells.Add(ccl);
                        tRow.Cells.Add(status);
                        Table1.Rows.Add(tRow);
                    }
                }
                Page.DataBind();
            }
        }
Пример #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        SQLProcs      sqlobj        = new SQLProcs();
        DataSet       dsDT          = null;
        ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);

        rwSaveTime.VisibleOnPageLoad = true;
        rwSaveTime.Visible           = false;

        rwHelp.VisibleOnPageLoad = true;
        rwHelp.Visible           = false;

        rwReferenceHelp.VisibleOnPageLoad = true;
        rwReferenceHelp.Visible           = false;

        dtpFollowupdate.MinDate = DateTime.Today;
        dtpTargetDate.MinDate   = DateTime.Today;

        ddlReferenceGroup.SelectedIndex = 2;
        ddlReferenceGroup.Enabled       = false;

        ddlType.Enabled = false;

        rwCustomerProfile.VisibleOnPageLoad = true;
        rwCustomerProfile.Visible           = false;


        if (!IsPostBack)
        {
            if (!this.Page.User.Identity.IsAuthenticated)
            {
                FormsAuthentication.RedirectToLoginPage();

                return;
            }

            UserMenuLog uml = new UserMenuLog();
            uml.InsertUserMenuLog(Session["UserID"].ToString(), "New Complaints", DateTime.Now);

            UserID = Session["UserID"].ToString();

            //dsDT = sqlobj.SQLExecuteDataset("GetServerDateTime");
            //lblDate.Text = Convert.ToDateTime(dsDT.Tables[0].Rows[0][0].ToString()).ToString("dd-MMM-yyyy | hh:mm tt"); ;
            dtpAssignOnDate.SelectedDate = DateTime.Now.Date;
            dtpTargetDate.SelectedDate   = DateTime.Now.AddDays(3);
            //LoadCompleInDays();

            if (Session["TaskType"] == null)
            {
                TaskType = "FromDirect";
            }
            else
            {
                TaskType = Session["TaskType"].ToString();
            }


            if (TaskType == "FromDirect")
            {
                LoadCustomer();
                LoadTrackOn();
            }
            else if (TaskType == "FromProspect")
            {
                LoadProspectCustomer();
                ddlCustName.SelectedValue = Session["ProspectRSN"].ToString();
                ddlCustName.Enabled       = false;

                ddlType.Enabled = false;

                LoadTrackOn();

                ddlTrackon.SelectedValue = Session["Reference"].ToString();
            }



            //LoadCustomer();


            LoadAssignedTo();

            //LoadTrackOn();

            //LoadTaskType();
            LoadAssignedBy();
            //LoadStatus();
            LoadPriority();
            // LoadComplexity();
            LoadCustStatus();



            //ddlTrackon.SelectedItem.Value = "#Complaint" ;

            ddlTrackon.SelectedValue = "#Complaint";

            LoadRemarks();
            LoadSaveTime();

            LoadUserLevel();

            ddlPriority.SelectedIndex = 1;
            LoadComplaints();
        }
    }
 public void CurrentLoginUserSignOut()
 {
     Session["CurrentLoginUser"] = null;
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #19
0
 /// <summary>
 /// Metoda wywoływane przez naciśnięcie przycisku wyloguj.
 /// </summary>
 /// <param name="sender"> obiekt wywołujący.</param>
 /// <param name="e">The <see cref="EventArgs"/> Obiekt przechowujący dane wydarzenia.</param>
 protected void Wyloguj(object sender, EventArgs e)
 {
     HttpContext.Current.Session.Remove("client");
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!Request.IsAuthenticated)
         {
             FormsAuthentication.RedirectToLoginPage();
         }
         else
         {
             if (Session["sessionId"] == null)
             {
                 Response.Redirect("index.aspx");
             }
             else
             {
                 if (Session["sessionId"] == null)
                 {
                     SessionCL sessionCL = sessionBLL.addorCheckSession();
                     Session["sessionId"] = sessionCL.id;
                 }
                 else
                 {
                     sessionId = Convert.ToInt32(Session["sessionId"]);
                     int       studentId = 0;
                     StudentCL studentCL = new StudentCL();
                     studentId = Convert.ToInt32(Request.QueryString["studentId"]);
                     if (studentId != 0)
                     {
                         studentId = Convert.ToInt32(Request.QueryString["studentId"]);
                         studentCL = studentBLL.viewStudentById(studentId, sessionId);
                     }
                     else
                     {
                         studentId = Convert.ToInt32(Request.QueryString["admNo"]);
                         studentCL = studentBLL.viewStudentByAdmissionNo(studentId, sessionId);
                         studentId = studentCL.id;
                     }
                     imgLogo.ImageUrl    = "logo.jpg";
                     lblStudentName.Text = studentCL.studentName;
                     lblFatherName.Text  = studentCL.fatherName;
                     lblMotherName.Text  = studentCL.motherName;
                     lblAdmissionNo.Text = studentCL.admissionNo.ToString();
                     lblClassSec.Text    = studentCL.classSection;
                     lblExamination.Text = "UNIT 1";
                     int examinationId = reportBLL.viewExamIdByClass(studentCL.classId, "UNIT 1");
                     Collection <SubjectCL>    subjectCol = subjectBLL.viewSubjectByClassId(studentCL.classId);
                     Collection <MarksEntryCL> marksCol   = reportBLL.viewMarksByStudentId(studentId, examinationId);
                     MiscEntryCL remarksAttendance        = reportBLL.viewMiscByStudentId(studentId, examinationId);
                     lblAttendance.Text = remarksAttendance.attendance;
                     lblRemarks.Text    = remarksAttendance.remarks;
                     var       subjectColl = subjectCol.OrderBy(x => x.name);
                     DataTable dt          = new DataTable();
                     DataRow   dr          = null;
                     dt.Columns.Add(new DataColumn("Subjects", typeof(string)));
                     dt.Columns.Add(new DataColumn("Max. Marks", typeof(int)));
                     dt.Columns.Add(new DataColumn("Min. Marks", typeof(int)));
                     dt.Columns.Add(new DataColumn("Obtained Marks", typeof(string)));
                     IDictionary <int, string> marksSubjectDict = new Dictionary <int, string>();
                     foreach (MarksEntryCL item in marksCol)
                     {
                         marksSubjectDict.Add(item.subjectId, item.marks);
                     }
                     double grandTotal = 0;
                     for (int i = 54; i <= 71; i++)
                     {
                         DeletePractical(subjectCol, i);
                     }
                     DeletePractical(subjectCol, 116);
                     foreach (SubjectCL item in subjectCol)
                     {
                         dr               = dt.NewRow();
                         dr["Subjects"]   = item.name;
                         dr["Max. Marks"] = 20;
                         dr["Min. Marks"] = 8;
                         if (marksSubjectDict.ContainsKey(item.id))
                         {
                             dr["Obtained Marks"] = marksSubjectDict[item.id];
                             grandTotal           = grandTotal + Convert.ToDouble(marksSubjectDict[item.id]);
                         }
                         else
                         {
                             dr["Obtained Marks"] = string.Empty;
                         }
                         dt.Rows.Add(dr);
                     }
                     grdMarksReport.DataSource = dt;
                     grdMarksReport.DataBind();
                     lblGrandTotal.Text = grandTotal.ToString();
                     lblPercentage.Text = grandTotal + "%";
                 }
             }
         }
     }
 }
Пример #21
0
 public void OnClick_LotgOut(object sender, EventArgs args)
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
 public void RedirectToLoginPage()
 {
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #23
0
    private void UserLogin()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        if (this.Session["UserName"] == null)
        {
        }
        try
        {
            string str  = "";
            string str2 = "";
            if (base.Request.QueryString["name"] != null)
            {
                str2 = base.Request.QueryString["name"].ToString();
            }
            new ArrayList();
            this._bill_Sys_LoginBO = new Bill_Sys_LoginBO();
            DataSet set = new DataSet();
            set = this._bill_Sys_LoginBO.getLoginDetails(this.Session["UserName"].ToString(), str2, HttpContext.Current.Request.UserHostAddress);
            if ((set.Tables.Count > 0) && (set.Tables[0].Rows.Count > 0))
            {
                this.objAppSettings = (ApplicationSettings_BO)base.Application["OBJECT_APP_SETTINGS"];
                if (this.objAppSettings == null)
                {
                    this.objAppSettings = new ApplicationSettings_BO();
                    base.Application["OBJECT_APP_SETTINGS"] = this.objAppSettings;
                }
                if ((set.Tables[0].Rows.Count == 1) && (set.Tables[0].Rows[0][0].ToString() == "False"))
                {
                    string str3 = HttpContext.Current.Request.UserHostAddress.ToString();
                    FormsAuthentication.SignOut();
                    FormsAuthentication.RedirectToLoginPage("IPValidationCheck=false&InvalidIP=" + str3);
                    return;
                }
                this._bill_Sys_UserObject                           = new Bill_Sys_UserObject();
                this._bill_Sys_UserObject.SZ_USER_ID                = set.Tables[0].Rows[0][0].ToString();
                this._bill_Sys_UserObject.SZ_USER_NAME              = set.Tables[0].Rows[0][1].ToString();
                this._bill_Sys_UserObject.SZ_USER_ROLE              = set.Tables[0].Rows[0][4].ToString();
                this._bill_Sys_UserObject.SZ_PROVIDER_ID            = set.Tables[0].Rows[0][5].ToString();
                this._bill_Sys_UserObject.SZ_USER_ROLE_NAME         = set.Tables[0].Rows[0][8].ToString();
                this._bill_Sys_UserObject.SZ_USER_EMAIL             = set.Tables[0].Rows[0]["USER_EMAIL_ID"].ToString();
                this._bill_Sys_UserObject.DomainName                = set.Tables[0].Rows[0]["DomainName"].ToString();
                this.Session["USER_OBJECT"]                         = this._bill_Sys_UserObject;
                this._bill_Sys_BillingCompanyObject                 = new Bill_Sys_BillingCompanyObject();
                this._bill_Sys_BillingCompanyObject.SZ_COMPANY_ID   = set.Tables[0].Rows[0][2].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_COMPANY_NAME = set.Tables[0].Rows[0][3].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_PREFIX       = set.Tables[0].Rows[0][6].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_ADDRESS      = set.Tables[0].Rows[0][9].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_EMAIL        = set.Tables[0].Rows[0][10].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_PHONE        = set.Tables[0].Rows[0][11].ToString();
                this._bill_Sys_BillingCompanyObject.SZ_FAX          = set.Tables[0].Rows[0][12].ToString();
                if (set.Tables[0].Rows[0][7].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = Convert.ToBoolean(set.Tables[0].Rows[0][7].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY = false;
                }
                if (set.Tables[0].Rows[0][13].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = Convert.ToBoolean(set.Tables[0].Rows[0][13].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM = false;
                }
                if (set.Tables[0].Rows[0]["BT_ATTORNY"].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_ATTORNY = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_ATTORNY"].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_ATTORNY = false;
                }
                if (set.Tables[0].Rows[0]["BT_PROVIDER"].ToString() != "")
                {
                    this._bill_Sys_BillingCompanyObject.BT_PROVIDER = Convert.ToBoolean(set.Tables[0].Rows[0]["BT_PROVIDER"].ToString());
                }
                else
                {
                    this._bill_Sys_BillingCompanyObject.BT_PROVIDER = false;
                }
                this.Session["BILLING_COMPANY_OBJECT"] = this._bill_Sys_BillingCompanyObject;
                //Custom schedular
                Session["Billing_Company_ID"]      = _bill_Sys_BillingCompanyObject.SZ_COMPANY_ID;
                this._bill_Sys_CaseInfo            = new Bill_Sys_Case();
                this._bill_Sys_CaseInfo.SZ_CASE_ID = "";
                this.Session["CASE_INFO"]          = this._bill_Sys_CaseInfo;
                this._bill_Sys_SystemObject        = new Bill_Sys_SystemObject();
                DataView view = new DataView(set.Tables[1]);
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00003'";
                this._bill_Sys_SystemObject.SZ_DEFAULT_LAW_FIRM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00004'";
                this._bill_Sys_SystemObject.SZ_CHART_NO = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00007'";
                this._bill_Sys_SystemObject.SZ_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00008'";
                this._bill_Sys_SystemObject.SZ_CHECKINVALUE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00009'";
                this._bill_Sys_SystemObject.AddVisits_SearchByChartNumber = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00014'";
                this._bill_Sys_SystemObject.SZ_SHOW_PROCEDURE_CODE_ON_INTEGRATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00017'";
                this._bill_Sys_SystemObject.SZ_SHOW_PROVIDER_DISPLAY_NAME = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00018'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00019'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00020'";
                this._bill_Sys_SystemObject.SZ_SHOW_DOCTOR_SIGNATURE_FOR_NF3 = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                this._bill_Sys_SystemObject.SZ_SHOW_DATE_OF_FIRST_TREATMENT  = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00022'";
                this._bill_Sys_SystemObject.SZ_SHOW_NEW_POM = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00023'";
                this._bill_Sys_SystemObject.SZ_ASSIGN_DIAGNOSIS_CODE_TO_VISIT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00025'";
                this._bill_Sys_SystemObject.ASSOCIATE_CASE_TYPE_WITH_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00026'";
                this._bill_Sys_SystemObject.ADD_LOCATION_TO_VISITS = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00024'";
                this._bill_Sys_SystemObject.SZ_SHOW_INSURANCE_WITH_BILL = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00029'";
                this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_NF2_PDF = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00028'";
                this._bill_Sys_SystemObject.SZ_SHOW_NF3_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00030'";
                this._bill_Sys_SystemObject.ALLOW_TO_ADD_VISIT_FOR_FUTURE_DATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00031'";
                this._bill_Sys_SystemObject.PHONE_FORMATE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00032'";
                this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_PATIENT_PHONE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00033'";
                this._bill_Sys_SystemObject.DONOT_ALLOW_TO_CREATE_BILL_WITHOUT_LOCATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00034'";
                this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00037'";
                this._bill_Sys_SystemObject.SZ_ADD_SECONDARY_INSURANCE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00038'";
                this._bill_Sys_SystemObject.SZ_SHOW_ADD_TO_PREFERED_LIST_FOR_DIAGNOSIS_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00049'";
                this._bill_Sys_SystemObject.SZ_SHOW_PATIENT_WALK_IN_ON_WORKAREA = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00050'";
                this._bill_Sys_SystemObject.SZ_COPY_PATIENT_TO_TEST_FACILITY = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00054'";
                this._bill_Sys_SystemObject.SZ_HP1_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00051'";
                this._bill_Sys_SystemObject.SZ_MG2_Display = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00062'";
                this._bill_Sys_SystemObject.SZ_ALLOW_TO_EDIT_CODE_AMOUNT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00059'";
                this._bill_Sys_SystemObject.SZ_ALLOW_HP1_SIGN = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00057'";
                this._bill_Sys_SystemObject.SZ_ALLOW_MODIFIER_TO_UPDATE_FOR_PROCEDURE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00080'";
                this._bill_Sys_SystemObject.SZ_ADD_APPOINTMENT = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00082'";
                this._bill_Sys_SystemObject.SZ_ENABLE_CYCLIC_PROCEDURE_CODE = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00084'";
                this._bill_Sys_SystemObject.IS_EMPLOYER = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";
                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00086'";
                this._bill_Sys_SystemObject.SZ_ENABLE_CONTRACT_PDF_GENERATION = (view.ToTable().Rows.Count > 0) ? view.ToTable().Rows[0][1].ToString() : "0";


                view.RowFilter = "SZ_SYS_SETTING_KEY_ID='SS00012'";
                if (view.ToTable().Rows.Count > 0)
                {
                    if (view.ToTable().Rows[0][1].ToString() == this._bill_Sys_UserObject.SZ_USER_ID)
                    {
                        this.Session["IPAdmin"] = "True";
                    }
                    else
                    {
                        this.Session["IPAdmin"] = "False";
                    }
                }
                else
                {
                    this.Session["IPAdmin"] = "False";
                }
                DataTable table = set.Tables[2];
                foreach (DataRow row in table.Rows)
                {
                    if (row["SZ_CONFIGURATION"].ToString() == "SOFT DELETE")
                    {
                        this._bill_Sys_SystemObject.SZ_SOFT_DELETE = "True";
                    }
                    else
                    {
                        if (row["SZ_CONFIGURATION"].ToString() == "HARD DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_HARD_DELETE = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NEW BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_NEW_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "VIEW BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_VIEW_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "DELETE BILLS")
                        {
                            this._bill_Sys_SystemObject.SZ_DELETE_BILLS = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "DELETE VISIT")
                        {
                            this._bill_Sys_SystemObject.SZ_DELETE_VIEWS = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "EMG BILL")
                        {
                            this._bill_Sys_SystemObject.SZ_EMG_BILL = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NOTE DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_NOTE_DELETE = "True";
                            continue;
                        }
                        if (row["SZ_CONFIGURATION"].ToString() == "NOTE SOFT DELETE")
                        {
                            this._bill_Sys_SystemObject.SZ_NOTE_SOFT_DELETE = "True";
                        }
                    }
                }
                this.Session["SYSTEM_OBJECT"] = this._bill_Sys_SystemObject;
                this._bill_Sys_LoginBO.ChangeLoginDate(((Bill_Sys_UserObject)this.Session["USER_OBJECT"]).SZ_USER_ID);
                this.Session["REMINDER"]  = "TRUE";
                this.Session["IMDETAILS"] = "TRUE";
                string str4 = set.Tables[0].Rows[0][8].ToString();
                if (str4.ToLower() == "doctor")
                {
                    if ((set.Tables.Count > 3) && (set.Tables[3].Rows.Count > 0))
                    {
                        str = set.Tables[3].Rows[0][0].ToString();
                    }
                    if (str.ToString().Equals("IM"))
                    {
                        this.Session["PageRedirect"] = "~/Bill_Sys_IM_CheckOut.aspx";
                    }
                    else
                    {
                        this.Session["PageRedirect"] = @"~/AJAX Pages\Bill_Sys_PatientSearch.aspx";
                    }
                }
                else if (str4.ToLower() == "agent")
                {
                    this.Session["PageRedirect"] = "~/Agent/Bill_Sys_Agent_SearchCase.aspx";
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                    {
                        string s = this.Session["urlintegration"].ToString();
                        s = base.Server.UrlEncode(s);
                        this.Session["PageRedirect"] = "~/ATT/Bill_Sys_AttorneySearch.aspx?dt=" + s;
                    }
                    if (this.Session["IntDocUrl"] != null)
                    {
                        Bill_Sys_DocumentManagerObject obj2 = new Bill_Sys_DocumentManagerObject();
                        string str6 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        obj2 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                        string str7  = obj2.SZ_CASE_ID;
                        string str8  = obj2.SZ_CASE_NO;
                        string str9  = obj2.SZ_COMAPNY_ID;
                        string str10 = obj2.SZ_LAWFIRM_ID;
                        if (str6 == str10)
                        {
                            this.Session["PageRedirect"] = "~/Document Manager/case/vb_CaseInformation.aspx?caseid=" + str7 + "&caseno=" + str8 + "&cmpid=" + str9;
                        }
                        else
                        {
                            this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                        }
                    }
                    else
                    {
                        this.Session["PageRedirect"] = @"~/LF\Bill_Sys_SearchCase.aspx";
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                {
                    if (str4.ToLower() == "provider")
                    {
                        this.Session["PageRedirect"] = @"~/Provider\Bill_Sys_SearchCase.aspx";
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    this.Session["PageRedirect"] = @"~/ATT\Bill_Sys_AttorneySearch.aspx";
                }
                else if (set.Tables[0].Rows[0][6].ToString() != "")
                {
                    this.Session["PageRedirect"] = "~/AJAX Pages/Bill_Sys_SearchCase.aspx";
                }
                else
                {
                    this.Session["PageRedirect"] = "~/Bill_Sys_BillingCompany.aspx";
                }
                if (set.Tables[0].Rows[0]["Force_PasswordChange"].ToString() == "True")
                {
                    base.Response.Redirect(@"AJAX Pages\Bill_Sys_ChangePassword.aspx", false);
                    return;
                }
                if (str4.ToLower() == "doctor")
                {
                    if (str.ToString().Equals("IM"))
                    {
                        base.Response.Redirect("Bill_Sys_IM_CheckOut.aspx", false);
                    }
                    else
                    {
                        base.Response.Redirect(@"AJAX Pages\Bill_Sys_PatientSearch.aspx", false);
                    }
                }
                else if (str4.ToLower() == "agent")
                {
                    base.Response.Redirect(@"Agent\Bill_Sys_Agent_SearchCase.aspx", false);
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_LAW_FIRM.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    if ((str4.ToLower() == "lawfirm attorney") && (this.Session["urlintegration"] != null))
                    {
                        string str11 = this.Session["urlintegration"].ToString();
                        str11 = base.Server.UrlEncode(str11);
                        str11 = "ATT/Bill_Sys_AttorneySearch.aspx?dt=" + str11;
                        base.Response.Redirect(str11, false);
                    }
                    if (this.Session["IntDocUrl"] != null)
                    {
                        Bill_Sys_DocumentManagerObject obj3 = new Bill_Sys_DocumentManagerObject();
                        obj3 = (Bill_Sys_DocumentManagerObject)this.Session["IntDocUrl"];
                        string str12 = ((Bill_Sys_BillingCompanyObject)this.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID;
                        string str13 = obj3.SZ_CASE_ID;
                        string str14 = obj3.SZ_CASE_NO;
                        string str15 = obj3.SZ_COMAPNY_ID;
                        string str16 = obj3.SZ_LAWFIRM_ID;
                        if (str12 == str16)
                        {
                            string url = "Document Manager/case/vb_CaseInformation.aspx?caseid=" + str13 + "&caseno=" + str14 + "&cmpid=" + str15;
                            base.Response.Redirect(url, false);
                        }
                        else
                        {
                            base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                        }
                    }
                    else
                    {
                        base.Response.Redirect(@"LF\Bill_Sys_SearchCase.aspx", false);
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_PROVIDER.ToString().Equals("True"))
                {
                    if (str4.ToLower() == "provider")
                    {
                        base.Response.Redirect(@"Provider\Bill_Sys_SearchCase.aspx", false);
                    }
                }
                else if (this._bill_Sys_BillingCompanyObject.BT_ATTORNY.ToString().Equals("True") && this._bill_Sys_BillingCompanyObject.BT_REFERRING_FACILITY.ToString().Equals("False"))
                {
                    base.Response.Redirect(@"ATT\Bill_Sys_AttorneySearch.aspx", false);
                }
                else if (set.Tables[0].Rows[0][6].ToString() != "")
                {
                    base.Response.Redirect("AJAX Pages/Bill_Sys_SearchCase.aspx", false);
                }
                else
                {
                    base.Response.Redirect("Bill_Sys_BillingCompany.aspx", false);
                }
            }
            else
            {
                FormsAuthentication.SignOut();
                FormsAuthentication.RedirectToLoginPage();
            }
            this._bill_Sys_BillingCompanyObject.SZ_READ_ONLY = this._bill_Sys_LoginBO.Readonly();
            this.Session["APPSTATUS"] = this._bill_Sys_BillingCompanyObject;
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
 public void RedirectToLoginPage_XtraQuery_Null()
 {
     FormsAuthentication.RedirectToLoginPage(null);
 }
Пример #25
0
 // GET: Account
 public void Logout()
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
 public void RedirectToLoginPage_XtraQuery_Empty()
 {
     FormsAuthentication.RedirectToLoginPage(String.Empty);
 }
Пример #27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage("Login.aspx");
 }
Пример #28
0
 protected void btnSignout_Click(object sender, EventArgs e)
 {
     //This would signout the user and remove the authentication cookie, so the user is taken back to the login page directly
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #29
0
 protected void btnLogout_Click(object sender, EventArgs e)
 {
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }
Пример #30
0
 protected void btnSalir_Click(object sender, EventArgs e)
 {
     Session["Operario"] = null;
     FormsAuthentication.SignOut();
     FormsAuthentication.RedirectToLoginPage();
 }