Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            XmlDocument blogs = new XmlDocument();

            try
            {
                blogs.Load(new XmlTextReader("http://feeds.feedburner.com/Telerik"));

                namespaceManager = new XmlNamespaceManager(blogs.NameTable);
                namespaceManager.AddNamespace("be", "http://www.w3.org/2005/Atom");
                XmlNodeList blogsList = blogs.DocumentElement.SelectNodes("be:entry", NamespaceManager);
                RadRotator1.DataSource = blogsList;
                RadRotator1.DataBind();
            }
            catch
            {
                RadRotator1.Visible = false;
                lblMessage.Visible  = true;
                lblMessage.Text     = "No Data Available.";
            }

            am = new AppManager("cnCSRS", "SummaryCSR", true, false);
            am.Utility.LoadGrid(RadGrid2, "Select * From SMSMessage order by [SerialNO] desc", new string[] { });
            EmployeeWisePRAssign();
        }
Exemplo n.º 2
0
 protected void RepaintScreen()
 {
     GetGridDataSource();
     GetGridDraftedPosDataSource();
     LoadrDDSeasonTeam();
     rGridDraftPlayer.DataBind();
     rGridDraftPositionStatus.DataBind();
     RadRotator1.DataBind();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["CertID"] != null)
            {
                RadComboBoxCertNum.SelectedValue = Session["CertID"].ToString();
                RadComboBoxCertNum.DataBind();
                Session["CertID"] = null;
                RadRotator1.DataBind();
            }
            else
            {
                PanelPushImages.Visible    = false;
                RadButtonCreateNew.Visible = false;
            }
        }

        lblCertID.Text = RadComboBoxCertNum.SelectedValue.ToString() + "f";
        HttpCookie authCookie = Request.Cookies[FormsAuthentication.FormsCookieName];

        if (!(authCookie == null))
        {
            //Following code removes logged in cookie
            //authCookie.Expires = DateTime.Now.AddDays(-1D);
            //Response.Cookies.Add(authCookie);

            //Get Authentication Cookie
            FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
            string   cookiePath   = ticket.CookiePath;
            DateTime expiration   = ticket.Expiration;
            bool     expired      = ticket.Expired;
            bool     isPersistent = ticket.IsPersistent;
            DateTime issueDate    = ticket.IssueDate;
            string   name         = ticket.Name;
            login = name;
            string userData = ticket.UserData;

            if (name == "")
            {
                Session["OrigUrl"] = "~/Stim/CertImageOrder.aspx";
                Response.Redirect("~/Login.aspx?" + Request.QueryString["nologin"].ToString());
            }
            else
            {
                LabelUSER.Text = "<b><i>" + name.ToUpper() + "</i></b>";
            }
        }
        else
        {
            Session["OrigUrl"] = "~/Stim/CertImageOrder.aspx";
            Response.Redirect("~/Login.aspx");
        }
    }
Exemplo n.º 4
0
        private void ConfigureRadRotator(RotatorType rotatorType)
        {
            RadRotator1.RotatorType = rotatorType;// Change rotator's type

            if (rotatorType.Equals(RotatorType.CarouselButtons))
            {
                RadRotator1.Width = Unit.Pixel(810 + RadRotatorSizeConfigurator.GetButtonsSize(RadRotator1));
            }
            else
            {
                RadRotator1.Width = Unit.Pixel(810);
            }

            RadRotator1.DataSource = GetFilesInFolder(virtualPath);// Set datasource
            RadRotator1.DataBind();
        }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // if (!IsPostBack)
     {
         string home = this.PortalSettings.HomeDirectoryMapPath;
         if (Directory.Exists(home + ImageDirectory))
         {
             string[] fi = Directory.GetFiles(home + ImageDirectory);
             if (fi.Length > 0)
             {
                 imgDetail.ImageUrl = Page.ResolveUrl("~\\BBImagehandler.ashx") + "?Width=" + ((ImageWidth + 10) * ImageCount - 10).ToString() + "&File=" + HttpUtility.UrlEncode(fi[0].Trim());
                 if (fi.Length > 1)
                 {
                     for (int i = 0; i < fi.Length; i++)
                     {
                         fi[i] = Page.ResolveUrl("~\\BBImagehandler.ashx") + "?Width=" + ImageWidth.ToString() + "&BackColor=" + HttpUtility.UrlEncode(ImageBackColor) + "&Mode=FitSquare&File=" + HttpUtility.UrlEncode(fi[i].Trim());
                     }
                     RadRotator1.ItemWidth  = new Unit(ImageWidth + 10);
                     RadRotator1.Width      = new Unit((ImageWidth + 10) * ImageCount - 10);
                     RadRotator1.ItemHeight = new Unit(ImageWidth);
                     RadRotator1.Height     = RadRotator1.ItemHeight;
                     RadRotator1.ItemClick += new RadRotatorEventHandler(RadRotator1_ItemClick);
                     RadRotator1.DataSource = fi;
                     RadRotator1.DataBind();
                     RadRotator1.Style.Add("cursor", "hand");
                 }
                 else
                 {
                     RadRotator1.Visible = false;
                 }
             }
             else
             {
                 imgDetail.Visible = false;
             }
         }
         else
         {
             RadRotator1.Visible = false;
             imgDetail.Visible   = false;
         }
     }
     if (_ImageControl != null)
     {
         imgDetail.Visible = false;
     }
 }
    protected void RadComboBoxCertNum_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        RadRotator1.DataBind();
        RadButtonCreateNew.Visible = true;
        //the following query checks for images on SSIRENT that are not at stimservices.com
        SqlConnection Dbconn  = new SqlConnection(ConfigurationManager.ConnectionStrings["SSIRentConnectionString"].ToString());
        string        cmdtext = "select Distinct C.CertificationID From  tblSTIM_Certification C inner join tblSTIM_ImageLibrary I  on C.CertificationID = I.CertificationID" +
                                " inner join [www.stimservices.com].FileDownload.dbo.tbl_customerfiles S on C.CertificationNumber = S.CertNumber " +
                                // " left join tblSTIM_Certification_SpecificationNumber Spec on C.SpecificationNumberID = Spec.SpecificationNumberID" +
                                " where S.Status = 'O' and S.SerialNumber = C.ItemNumber and S.CertTypeID = C.MethodofInspectionID " +
                                " and C.CertificationID = @CertificationID group by C.CertificationNumber,C.CertificationID,S.CUstomerFileID " +
                                " having COUNT(I.ImageID) > (select COUNT(ImageID) from [www.stimservices.com].FileDownload.dbo.tblstim_ImageLibrary SI where SI.CustomerFileID = S.CustomerFileID)";

        SqlCommand cmd = new SqlCommand(cmdtext, Dbconn);

        Dbconn.Open();
        cmd.Parameters.AddWithValue("@CertificationID", RadComboBoxCertNum.SelectedValue);
        try
        {
            SqlDataReader dr = cmd.ExecuteReader();
            if (dr.HasRows)
            {
                PanelPushImages.Visible = true;
            }
            else
            {
                PanelPushImages.Visible = false;
            }
        }
        catch (Exception ex)
        {
        }
        finally
        {
            Dbconn.Close();
            Dbconn.Dispose();
            cmd.Dispose();
        }


        RadButtonCreateNew.Visible = true;
    }
 private void LoadData()
 {
     RadRotator1.DataSource = ImagePortletCollection.GetImagePortletCollection(Portlet.PortletInstance.Id);
     RadRotator1.DataBind();
 }