Exemple #1
0
 protected void rgFamilyLedger_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
     if (e.Item is GridPagerItem)
     {
         RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
         PageSizeCombo.Items.Clear();
         PageSizeCombo.Items.Add(new RadComboBoxItem("25"));
         PageSizeCombo.FindItemByText("25").Attributes.Add("ownerTableViewId", rgFamilyLedger.MasterTableView.ClientID);
         PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
         PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgFamilyLedger.MasterTableView.ClientID);
         //PageSizeCombo.Items[0].Text = "25";
         //PageSizeCombo.Items[1].Text = "50";
         PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
     }
     if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
     {
         DayCarePL.ChildFamilyProperties objChildFamily = e.Item.DataItem as DayCarePL.ChildFamilyProperties;
         HyperLink hlLateFees = e.Item.FindControl("hlLateFees") as HyperLink;
         hlLateFees.Attributes.Add("onclick", "ShowLateFee('" + objChildFamily.Id + "','" + objChildFamily.FamilyTitle + "'); return false;");
         decimal LateFee = 0;
         if (ViewState["LateFee"] != null)
         {
             LateFee = Convert.ToDecimal(ViewState["LateFee"].ToString());
         }
         if (objChildFamily.Balance >= LateFee && LateFee > 0)
         {
             hlLateFees.Visible = true;
         }
         else
         {
             hlLateFees.Visible = false;
         }
     }
 }
 protected void rgChildAttendsList_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
     if (e.Item is GridPagerItem)
     {
         RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
         PageSizeCombo.Items.Clear();
         PageSizeCombo.Items.Add(new RadComboBoxItem("25"));
         PageSizeCombo.FindItemByText("25").Attributes.Add("ownerTableViewId", rgChildAttendsList.MasterTableView.ClientID);
         PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
         PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgChildAttendsList.MasterTableView.ClientID);
         //PageSizeCombo.Items[0].Text = "25";
         //PageSizeCombo.Items[1].Text = "50";
         PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
     }
     if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
     {
         DayCarePL.ChildDataProperties objChild = e.Item.DataItem as DayCarePL.ChildDataProperties;
         Image imgChild = e.Item.FindControl("imgChild") as Image;
         if (!string.IsNullOrEmpty(objChild.Photo))
         {
             imgChild.ImageUrl = "../ChildImages/" + objChild.Photo;
         }
         else
         {
             if (objChild.Gender == true)//true= Male
             {
                 imgChild.ImageUrl = "../ChildImages/boy.png";
             }
             else
             {
                 imgChild.ImageUrl = "../ChildImages/girl.png";
             }
         }
     }
 }
Exemple #3
0
 /// <summary>
 /// Raises the <see cref="E:ItemDataBound" /> event.
 /// </summary>
 /// <param name="e">The <see cref="GridItemEventArgs" /> instance containing the event data.</param>
 protected override void OnItemDataBound(GridItemEventArgs e)
 {
     base.OnItemDataBound(e);
     if (e.Item is GridPagerItem)
     {
         RadComboBox pageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
         if (pageSizeCombo != null)
         {
             if (this.ShowPageSizeComboBox)
             {
                 pageSizeCombo.Items.Clear();
                 pageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                 pageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
                 pageSizeCombo.Items.Add(new RadComboBoxItem("20"));
                 pageSizeCombo.FindItemByText("20").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
                 pageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                 pageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
                 pageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                 pageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
                 pageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
             }
             else
             {
                 pageSizeCombo.Visible = false;
                 Label changePageSizeLabel = (Label)e.Item.FindControl("ChangePageSizeLabel");
                 if (changePageSizeLabel != null)
                 {
                     changePageSizeLabel.Visible = false;
                 }
             }
         }
     }
 }
Exemple #4
0
    protected void BrowseGridSearch_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            if (!e.Item.IsInEditMode)
            {
                GridDataItem dataItem = (GridDataItem)e.Item;
                //if (dataItem["SSN"].Text.ToString() != null && dataItem["SSN"].Text.ToString() != "" && dataItem["SSN"].Text.ToString() != "&nbsp;")
                //{
                //    double dbl = Double.Parse(dataItem["SSN"].Text.ToString());
                //    string str = String.Format("{0:###-##-####}", dbl);
                //    dataItem["SSN"].Text = str;
                //}

                //GridBar
                HyperLink  View   = (HyperLink)e.Item.FindControl("lnkview");
                HyperLink  Edit   = (HyperLink)e.Item.FindControl("lnkedit");
                LinkButton Delete = (LinkButton)e.Item.FindControl("btndelete");
                Repository.Menu.GridBar(View, Edit, Delete);

                //Notes SectionMid
                Image ImgNote = (Image)e.Item.FindControl("Img_Note");

                bool Notes = (dataItem["Mid"].Text != "&nbsp;") ? Repository.Members.GetNotes_byMember(dataItem["Mid"].Text) : false;

                if (Notes)
                {
                    ImgNote.Visible = true;
                }
                else
                {
                    ImgNote.Visible = false;
                }
            }
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            criteria.pagerno   = Convert.ToInt32(PageSizeCombo.SelectedValue.ToString());
            Session["Smember"] = criteria;

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
            PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", BrowseGridActive.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("20"));
            PageSizeCombo.FindItemByText("20").Attributes.Add("ownerTableViewId", BrowseGridActive.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", BrowseGridActive.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", BrowseGridActive.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(criteria.pagerno.ToString()).Selected = true;
        }
    }
Exemple #5
0
    protected void rgAdminHospitalList_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem && e.Item.OwnerTableView.Name != "ExistingHospital")
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                //ImageButton imgButton = (ImageButton)item["Activate"].Controls[0];

                //imgButton.ImageUrl = "../Imagesnew/tickIcon.png";


                //GridDataItem item = (GridDataItem)e.Item;
                ImageButton lnkActivate = (ImageButton)item.FindControl("lnkActivate");
                lnkActivate.OnClientClick = "javascript:return confirm('Are you sure! You want to Activate this Hospital account?');";
            }
        }

        if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "ExistingHospital")
        {
            GridDataItem item = (GridDataItem)e.Item;
            if (item["InvalidNo"].Text == item["Mobile"].Text)
            {
                item.BackColor = System.Drawing.Color.Brown;
                item.ForeColor = System.Drawing.Color.White;
            }
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("300"));
            PageSizeCombo.FindItemByText("300").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("400"));
            PageSizeCombo.FindItemByText("400").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
            PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("750"));
            PageSizeCombo.FindItemByText("750").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
            PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgAdminHospitalList.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #6
0
    protected void rgFlagReason_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            FlagReasons f        = (FlagReasons)e.Item.DataItem;
            CheckBox    chkAcDec = (CheckBox)e.Item.FindControl("chkAcDec");
            HiddenField hdfId    = (HiddenField)e.Item.FindControl("hdfId");
            hdfId.Value = f.Id.ToString();
            CheckBox    chkIsHasOther = (CheckBox)e.Item.FindControl("chkIsHasOther");
            HiddenField hdfIdOther    = (HiddenField)e.Item.FindControl("hdfIdOther");
            hdfIdOther.Value = f.Id.ToString();


            if (f.IsActive)
            {
                chkAcDec.Checked = true;
            }
            else
            {
                chkAcDec.Checked = false;
            }
            if (f.isHasOther)
            {
                chkIsHasOther.Checked = true;
            }
            else
            {
                chkIsHasOther.Checked = false;
            }


            LinkButton lnkBtnDelete = (LinkButton)e.Item.FindControl("lnkBtnDelete");
            lnkBtnDelete.Attributes.Add("onclick", "return DeleteConfirmation('" + ((GridDataItem)e.Item)["Bodyname"].Text + "');");
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgFlagReason.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgFlagReason.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgFlagReason.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", rgFlagReason.MasterTableView.ClientID);
            PageSizeCombo.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
    protected void rgAdminHospitalView_ItemDataBound(object sender, GridItemEventArgs e)
    {
        BindAdminDetail();

        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
            Session["SignInId"] = null;

            string strImageName = (dataItem["Thumbnail"].FindControl("lblImageName") as Label).Text;
            Image  imgThumbnail = dataItem["Thumbnail"].FindControl("imgThumbnail") as Image;

            if (!String.IsNullOrEmpty(strImageName) && strImageName.ToString() != "NoPhoto.gif")
            {
                imgThumbnail.ImageUrl = "~/Photo/" + strImageName;
            }
            else
            {
                imgThumbnail.ImageUrl = @"~/Photo/NoPhoto.gif";
            }
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("300"));
            PageSizeCombo.FindItemByText("300").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("400"));
            PageSizeCombo.FindItemByText("400").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
            PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("750"));
            PageSizeCombo.FindItemByText("750").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
            PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgAdminHospitalView.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #8
0
 protected void rgChildFamily_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
     if (e.Item is GridPagerItem)
     {
         RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
         PageSizeCombo.Items.Clear();
         PageSizeCombo.Items.Add(new RadComboBoxItem("25"));
         PageSizeCombo.FindItemByText("25").Attributes.Add("ownerTableViewId", rgChildFamily.MasterTableView.ClientID);
         PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
         PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgChildFamily.MasterTableView.ClientID);
         //PageSizeCombo.Items[0].Text = "25";
         //PageSizeCombo.Items[1].Text = "50";
         PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
     }
     if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
     {
     }
 }
Exemple #9
0
 /// <summary>
 /// Raises the <see cref="E:ItemDataBound" /> event.
 /// </summary>
 /// <param name="e">The <see cref="GridItemEventArgs"/> instance containing the event data.</param>
 protected override void OnItemDataBound(GridItemEventArgs e)
 {
     base.OnItemDataBound(e);
     if (e.Item is GridPagerItem)
     {
         RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
         PageSizeCombo.Items.Clear();
         PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
         PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
         PageSizeCombo.Items.Add(new RadComboBoxItem("20"));
         PageSizeCombo.FindItemByText("20").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
         PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
         PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
         PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
         PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", MasterTableView.ClientID);
         PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
     }
 }
    protected void rgAdminListDiagnosis_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item      = (GridDataItem)e.Item;
            ImageButton  imgButton = (ImageButton)item["Delete"].Controls[0];
            if (item["DeleteName"].Text == "Delete")
            {
                imgButton.ImageUrl = "../ImagesNew/delete-icon.png";
            }
            else
            {
                imgButton.ImageUrl = "../Imagesnew/tickIcon.png";
            }
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("300"));
            PageSizeCombo.FindItemByText("300").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("400"));
            PageSizeCombo.FindItemByText("400").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
            PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("750"));
            PageSizeCombo.FindItemByText("750").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
            PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgAdminListDiagnosis.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
    protected void rgAdminOrgNoDoctor_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridCommandItem)
        {
            GridCommandItem commandItem = (GridCommandItem)e.Item;
            commandItem.FindControl("InitInsertButton").Visible   = false;
            commandItem.FindControl("AddNewRecordButton").Visible = false;
        }

        if (e.Item is GridDataItem)
        {
            GridDataItem item      = (GridDataItem)e.Item;
            ImageButton  lnkDelete = (ImageButton)item.FindControl("lnkDelete");
            lnkDelete.OnClientClick = "javascript:return confirm('Are you sure you want to delete " + item["OrganizationName"].Text + "?');";
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("300"));
            PageSizeCombo.FindItemByText("300").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("400"));
            PageSizeCombo.FindItemByText("400").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
            PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("750"));
            PageSizeCombo.FindItemByText("750").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
            PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgAdminOrgNoDoctor.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #12
0
        protected void grdSolicitudes_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;
                    if (vIdCandidato != null && item.GetDataKeyValue("ID_CANDIDATO").ToString() == vIdCandidato.ToString() && vIdEmpleado == null)
                    {
                        item.Selected = true;
                    }
                }
            }

            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", grdSolicitudes.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", grdSolicitudes.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", grdSolicitudes.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", grdSolicitudes.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", grdSolicitudes.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
Exemple #13
0
        protected void rgPruebasEmpleados_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;
                    if (vIdEmpleado != null && item.GetDataKeyValue("M_EMPLEADO_ID_EMPLEADO").ToString() == vIdEmpleado.ToString())
                    {
                        item.Selected = true;
                        rtsAplicacionPruebas.Tabs[1].Selected = true;
                        rpvPruebasEmpleados.Selected          = true;
                    }
                }
            }

            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", rgPruebasEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgPruebasEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgPruebasEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgPruebasEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgPruebasEmpleados.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
Exemple #14
0
        protected void grdCompetencias_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
            }

            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", grdCompetencias.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", grdCompetencias.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", grdCompetencias.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", grdCompetencias.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", grdCompetencias.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
Exemple #15
0
        protected void grdRequisicion_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;

                if (e.Item.OwnerTableView.Name == "CandidatosAsociados")
                {
                    GridDataItem dataItem = e.Item as GridDataItem;
                    if (dataItem["CL_ESTATUS_CANDIDATO_REQUISICION"].Text == "Contratado")
                    {
                        item.BackColor = System.Drawing.ColorTranslator.FromHtml("#C6DB95");
                    }
                }
            }

            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", grdRequisicion.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", grdRequisicion.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", grdRequisicion.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", grdRequisicion.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", grdRequisicion.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
        protected void grdEscolaridades_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item = (GridDataItem)e.Item;
                //  System.Web.UI.WebControls.CheckBox chkbx = (System.Web.UI.WebControls.CheckBox)item["checkbox"].FindControl("CheckBox1");
            }
            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", grdEscolaridades.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", grdEscolaridades.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", grdEscolaridades.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", grdEscolaridades.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", grdEscolaridades.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
        protected void rgChildFamily_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");
                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("25"));
                PageSizeCombo.FindItemByText("25").Attributes.Add("ownerTableViewId", rgChildFamily.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgChildFamily.MasterTableView.ClientID);
                //PageSizeCombo.Items[0].Text = "25";
                //PageSizeCombo.Items[1].Text = "50";
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
            if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
            {
                //DayCarePL.ChildFamilyProperties objChildFamily = e.Item.DataItem as DayCarePL.ChildFamilyProperties;
                //HyperLink hlFamily = e.Item.FindControl("hlFamily") as HyperLink;
                //HyperLink hlChild = e.Item.FindControl("hlChild") as HyperLink;

                //hlFamily.NavigateUrl = "FamilyDataList.aspx?ChildFamilyId=" + objChildFamily.Id;
                //hlChild.NavigateUrl = "ChildData.aspx?ChildFamilyId=" + objChildFamily.Id;
            }
        }
    protected void rgRemainderSMS_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridCommandItem)
        {
            GridCommandItem commandItem = (GridCommandItem)e.Item;
            commandItem.FindControl("InitInsertButton").Visible   = false;
            commandItem.FindControl("AddNewRecordButton").Visible = false;
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("300"));
            PageSizeCombo.FindItemByText("300").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("400"));
            PageSizeCombo.FindItemByText("400").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
            PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("750"));
            PageSizeCombo.FindItemByText("750").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
            PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgRemainderSMS.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
        //protected void btnEnviarTodos_Click(object sender, EventArgs e)
        //{
        //    EnviarCorreo(true);
        //}

        protected void rgEvaluadores_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (vFgRevisaCuestionarios)
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem vFila = e.Item as GridDataItem;

                    int vContestados;
                    int vTotales;

                    if (vFila.GetDataKeyValue("NO_CUESTIONARIOS") != null)
                    {
                        vContestados = int.Parse(vFila.GetDataKeyValue("NO_CUESTIONARIOS_CONTESTADOS").ToString());
                        vTotales     = int.Parse(vFila.GetDataKeyValue("NO_CUESTIONARIOS").ToString());

                        if (vContestados != vTotales)
                        {
                            e.Item.Selected = true;
                        }
                    }
                }
            }

            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", rgEvaluadores.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgEvaluadores.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgEvaluadores.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgEvaluadores.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgEvaluadores.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
        protected void grdPerfilEmpleados_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items.Clear();
                PageSizeCombo.Items.Add(new RadComboBoxItem("10"));
                PageSizeCombo.FindItemByText("10").Attributes.Add("ownerTableViewId", grdPerfilEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
                PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", grdPerfilEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
                PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", grdPerfilEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
                PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", grdPerfilEmpleados.MasterTableView.ClientID);
                PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
                PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", grdPerfilEmpleados.MasterTableView.ClientID);
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
Exemple #21
0
    protected void radGridJury_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            EmailTemplate emailTemplate = (EmailTemplate)e.Item.DataItem;

            if (emailTemplate != null)
            {
                LinkButton lnkBtn = null;
                HyperLink  hlk    = null;

                EmailTemplate parentTemplate = EmailTemplate.GetEmailTemplate(emailTemplate.TemplateId);

                if (parentTemplate != null)
                {
                    Label lblTempalteName = (Label)e.Item.FindControl("lblTempalteName");
                    lblTempalteName.Text = parentTemplate.Title;
                }

                lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnEdit");
                lnkBtn.CommandArgument = emailTemplate.Id.ToString();

                if (Security.IsRoleAdmin() || Security.IsRoleAdmin2() || Security.IsReadOnlyAdmin())
                {
                    lnkBtn.Visible = false;
                }

                lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnDelete");
                lnkBtn.CommandArgument = emailTemplate.Id.ToString();

                if (Security.IsRoleAdmin() || Security.IsRoleAdmin2() || Security.IsReadOnlyAdmin())
                {
                    lnkBtn.Visible = false;
                }

                lnkBtn = (LinkButton)e.Item.FindControl("hlCloneTamplate");
                lnkBtn.CommandArgument = emailTemplate.Id.ToString();

                if (Security.IsRoleAdmin() || Security.IsRoleAdmin2() || Security.IsReadOnlyAdmin())
                {
                    lnkBtn.Visible = false;
                }

                hlk = (HyperLink)e.Item.FindControl("hlkPreview");


                hlk.CssClass    = "fancybox fancybox.iframe tblLinkRed";
                hlk.NavigateUrl = "./EmailPreview.aspx?etmId=" + emailTemplate.Id.ToString();
            }
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #22
0
    protected void radGridJury_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Jury jury = (Jury)e.Item.DataItem;

            LinkButton lnkBtn = null;
            Label      lbl    = null;
            HyperLink  lnk    = null;

            // Jury Id
            lnkBtn                 = (LinkButton)e.Item.FindControl("lnkBtnJuryId");
            lnkBtn.Text            = jury.SerialNo;
            lnkBtn.CommandArgument = jury.Id.ToString();

            ((GridDataItem)e.Item)["Status"].Text = jury.IsToDelete ? "Del" : "Cur";

            // Jury Name
            lnk             = (HyperLink)e.Item.FindControl("lnkJuryName");
            lnk.Text        = jury.FirstName + " " + jury.LastName;
            lnk.NavigateUrl = "mailto:" + jury.Email;

            lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnEdit");
            lnkBtn.CommandArgument = jury.Id.ToString();

            HiddenField hdfId = (HiddenField)e.Item.FindControl("hdfId");
            hdfId.Value = jury.Id.ToString();

            lnk             = (HyperLink)e.Item.FindControl("hlkEmailHistory");
            lnk.CssClass    = "fancybox fancybox.iframe tblLinkRed";
            lnk.NavigateUrl = "./EmailSentHistory.aspx?juryId=" + jury.Id.ToString();

            CheckBox chkbox = (CheckBox)e.Item.FindControl("chkbox");

            try {
                InvitationList invList = InvitationList.GetInvitationList(jury.Id, Gen_GeneralUseValueList.GetGen_GeneralUseValueList("EventCode")[0].Value);
                if (invList.Count > 0)
                {
                    chkbox.Enabled = false;
                }
            }
            catch { }


            lnk             = (HyperLink)e.Item.FindControl("hlkEmailHistory");
            lnk.CssClass    = "fancybox fancybox.iframe tblLinkRed";
            lnk.NavigateUrl = "./EmailSentHistory.aspx?juryId=" + jury.Id.ToString();

            LinkButton lnkDelete = (LinkButton)e.Item.FindControl("lnkDelete");
            lnkDelete.CommandArgument = jury.Id.ToString();
            LinkButton lnkRestore = (LinkButton)e.Item.FindControl("lnkRestore");
            lnkRestore.CommandArgument = jury.Id.ToString();

            CheckBox chkBox = (CheckBox)e.Item.FindControl("chkbox");

            switch ((string)ViewState["TabFilterValue"])
            {
            case "All":
                lnkRestore.Visible = false;
                lnkDelete.Visible  = true;
                chkBox.Visible     = true;
                break;

            case "Deleted":
                lnkDelete.Visible  = false;
                lnkRestore.Visible = true;
                chkBox.Visible     = false;
                break;

            default:
                lnkDelete.Visible = true;
                chkBox.Visible    = true;
                break;
            }

            if (Security.IsRoleReadOnlyAdmin())
            {
                lnkDelete.Visible = false;
            }
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridJury.MasterTableView.ClientID);
            PageSizeCombo.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #23
0
    protected void radGridEntry_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Effie2017.App.Registration reg = (Effie2017.App.Registration)e.Item.DataItem;

            LinkButton lnkBtn = null;
            Label      lbl    = null;
            HyperLink  lnk    = null;
            CheckBox   chkbox = null;

            // No
            //lbl = (Label)e.Item.FindControl("lblNo");
            //lbl.Text = counter.ToString();


            // submitted by
            lnkBtn                 = (LinkButton)e.Item.FindControl("lnkBtnSubmittedBy");
            lnkBtn.Text            = reg.Company;
            lnkBtn.CommandArgument = reg.Id.ToString();

            // Email
            lnk             = (HyperLink)e.Item.FindControl("lnkEmail");
            lnk.Text        = reg.Email;
            lnk.NavigateUrl = "mailto:" + reg.Email;

            // Contact
            ((GridDataItem)e.Item)["Contact"].Text = GeneralFunction.ShowFriendlyContact(reg.Contact);


            try {
                string DateReminder = "";
                if (reg.DateReminder(reg.Id, EmailTypeEnum.UserList.ToString()) != DateTime.MinValue)
                {
                    DateReminder = reg.DateReminder(reg.Id, EmailTypeEnum.UserList.ToString()).ToString("dd/MM/yy H:mm");
                }

                ((GridDataItem)e.Item)["DateReminder"].Text = DateReminder;
            }
            catch {
                ((GridDataItem)e.Item)["DateReminder"].Text = "";
            }

            // CAAAA
            lbl      = (Label)e.Item.FindControl("lbCAAAA");
            lbl.Text = GeneralFunction.ExtractBracketValue(reg.Caaaa);



            // APEP
            lbl      = (Label)e.Item.FindControl("lbAPEP");
            lbl.Text = GeneralFunction.ExtractBracketValue(reg.Apep);



            // view
            lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnView");
            lnkBtn.CommandArgument = reg.Id.ToString();

            // edit
            lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnEdit");
            lnkBtn.CommandArgument = reg.Id.ToString();
            Security.SecureControlByHiding(lnkBtn);

            // is verified
            lbl      = (Label)e.Item.FindControl("lbIsVerified");
            lbl.Text = reg.IsVerified ? "Yes" : "No";

            // chkbox verification
            //chkbox = (CheckBox)e.Item.FindControl("chkbox");
            //if (reg.Status == StatusRegistration.OK && !reg.IsVerified)
            //    chkbox.Enabled = true;
            //else
            //    chkbox.Enabled = false;


            lnk             = (HyperLink)e.Item.FindControl("hlkEmailHistory");
            lnk.CssClass    = "fancybox fancybox.iframe tblLinkRed";
            lnk.NavigateUrl = "./RegistrationEmailSentHistory.aspx?regId=" + reg.Id.ToString();


            counter++;
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridUser.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridUser.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridUser.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridUser.MasterTableView.ClientID);
            PageSizeCombo.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #24
0
    protected void radGridEntry_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Effie2017.App.Entry entry = (Effie2017.App.Entry)e.Item.DataItem;


            LinkButton lnkBtn, lnkBtn2 = null;
            Label      lbl = null;
            HyperLink  lnk = null;


            // Categories
            lbl      = (Label)e.Item.FindControl("lbCategory");//GeneralFunction.GetEntryMarket(entry.CategoryMarketFromRound(round)) + "<br/>" +
            lbl.Text = entry.CategoryPSDetailFromRound(round);


            // submitted by
            lbl = (Label)e.Item.FindControl("lnkBtnBuSubmittedBy");
            Registration reg = GeneralFunction.GetRegistrationFromEntry(entry);
            lbl.Text = "-";
            if (reg != null)
            {
                lbl.Text = reg.Company;
                //lnkBtn.CommandArgument = reg.Id.ToString();
            }

            // Country
            lbl      = (Label)e.Item.FindControl("lbCountry");
            lbl.Text = "-";
            if (reg != null)
            {
                lbl.Text = reg.Country;
            }

            // client and agency
            CompanyCreditList cclist = CompanyCreditList.GetCompanyCreditList(entry.Id);
            try
            {
                lbl      = (Label)e.Item.FindControl("lbClient");
                lbl.Text = cclist[0].Company;

                lbl      = (Label)e.Item.FindControl("lbAgency1");
                lbl.Text = cclist[1].Company;

                lbl      = (Label)e.Item.FindControl("lbAgency2");
                lbl.Text = cclist[2].Company;

                lbl      = (Label)e.Item.FindControl("lbAgency3");
                lbl.Text = cclist[3].Company;

                lbl      = (Label)e.Item.FindControl("lbAgency4");
                lbl.Text = cclist[4].Company;

                lbl      = (Label)e.Item.FindControl("lbAgency5");
                lbl.Text = cclist[5].Company;
            }
            catch { }


            //// submitted details
            //lbl = (Label)e.Item.FindControl("lblSubmittedDetails");
            //lbl.Text = reg.Firstname + " " + reg.Lastname + "<br/>" + reg.Job + "<br/>" + GeneralFunction.ShowFriendlyContact(reg.Contact) + "<br/>" + reg.Email;


            // Jury panel 1
            List <JuryPanelCategory> jcpList = GeneralFunction.GetJuryPanelCategoryFromCategoryPS(entry.CategoryMarketFromRound(round), entry.CategoryPSFromRound(round), entry.CategoryPSDetailFromRound(round), round);
            if (jcpList != null && jcpList.Count > 0)
            {
                lbl      = (Label)e.Item.FindControl("lbJuryPanel");
                lbl.Text = jcpList[0].PanelId;
            }


            // Jury panel round2



            // Jury
            List <EffieJuryManagementApp.Jury> jlist = GeneralFunction.GetJuryListFromEntryCategory(entry.CategoryMarketFromRound(round), entry.CategoryPSFromRound(round), entry.CategoryPSDetailFromRound(round), round);

            DisplayJury(e, "lbJury1", jlist, 0);
            DisplayJury(e, "lbJury2", jlist, 1);
            DisplayJury(e, "lbJury3", jlist, 2);
            DisplayJury(e, "lbJury4", jlist, 3);
            DisplayJury(e, "lbJury5", jlist, 4);
            DisplayJury(e, "lbJury6", jlist, 5);
            DisplayJury(e, "lbJury7", jlist, 6);
            DisplayJury(e, "lbJury8", jlist, 7);
            DisplayJury(e, "lbJury9", jlist, 8);
            DisplayJury(e, "lbJury10", jlist, 9);
            DisplayJury(e, "lbJury11", jlist, 10);
            DisplayJury(e, "lbJury12", jlist, 11);
            DisplayJury(e, "lbJury13", jlist, 12);
            DisplayJury(e, "lbJury14", jlist, 13);
            DisplayJury(e, "lbJury15", jlist, 14);
            DisplayJury(e, "lbJury16", jlist, 15);
            DisplayJury(e, "lbJury17", jlist, 16);
            DisplayJury(e, "lbJury18", jlist, 17);
            DisplayJury(e, "lbJury19", jlist, 18);
            DisplayJury(e, "lbJury20", jlist, 19);

            //// chkboxes
            //CheckBox chkbox = (CheckBox)e.Item.FindControl("chkbox");
            //Security.SecureControlByHiding(chkbox);
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            //PageSizeCombo.Items.Add(new RadComboBoxItem("20", "20"));
            //PageSizeCombo.FindItemByText("20").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            string PageSize = e.Item.OwnerTableView.PageSize.ToString();
            PageSizeCombo.FindItemByValue(PageSizeDefault.ToString()).Selected = true;
        }
    }
Exemple #25
0
        protected void gvbrokerageRecon_OnItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (rmVo.IsChecker == true)
            {
                if (lnk == false)
                {
                    if (e.Item is GridDataItem)
                    {
                        GridDataItem dataItem = e.Item as GridDataItem;

                        CheckBox chk = (CheckBox)dataItem["IsRecLocked"].FindControl("chkIdRec");

                        if (chk.Checked)
                        {
                            chk.Enabled = false;

                            TextBox text = (TextBox)dataItem["WCD_Act_Rec_Brokerage"].FindControl("txtActRecBrokerage");
                            text.Enabled = false;
                            TextBox text1 = (TextBox)dataItem["actionRec"].FindControl("txtRecDate");
                            text1.Enabled = false;
                        }
                        CheckBox chk2 = (CheckBox)dataItem["IsPayLocked"].FindControl("chkIdPay");
                        if (chk2.Checked)
                        {
                            chk2.Enabled = false;
                            TextBox text2 = (TextBox)dataItem["WCD_Act_Pay_brokerage"].FindControl("txtActPaybrokerage");
                            text2.Enabled = false;
                            TextBox text3 = (TextBox)dataItem["actionPay"].FindControl("txtPaybleDate");
                            text3.Enabled = false;
                        }
                    }
                }
                lnkEdit.Visible = true;
            }



            if (rmVo.IsMaker == true)
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem dataItem = e.Item as GridDataItem;

                    CheckBox chk = (CheckBox)dataItem["IsRecLocked"].FindControl("chkIdRec");
                    if (chk.Checked)
                    {
                        chk.Enabled = false;

                        TextBox text = (TextBox)dataItem["WCD_Act_Rec_Brokerage"].FindControl("txtActRecBrokerage");
                        text.Enabled = false;
                        TextBox text1 = (TextBox)dataItem["actionRec"].FindControl("txtRecDate");
                        text1.Enabled = false;
                    }
                    CheckBox chk2 = (CheckBox)dataItem["IsPayLocked"].FindControl("chkIdPay");
                    if (chk2.Checked)
                    {
                        chk2.Enabled = false;
                        TextBox text2 = (TextBox)dataItem["WCD_Act_Pay_brokerage"].FindControl("txtActPaybrokerage");
                        text2.Enabled = false;
                        TextBox text3 = (TextBox)dataItem["actionPay"].FindControl("txtPaybleDate");
                        text3.Enabled = false;
                    }
                }
            }
            if (e.Item is GridPagerItem)
            {
                RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

                PageSizeCombo.Items[0].Text  = "10";
                PageSizeCombo.Items[0].Value = "10";
                PageSizeCombo.Items[1].Text  = "50";
                PageSizeCombo.Items[1].Value = "50";
                PageSizeCombo.Items[2].Text  = "100";
                PageSizeCombo.Items[2].Value = "100";
                PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
            }
        }
Exemple #26
0
    protected void radGridEntry_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Effie2017.App.Entry entry = (Effie2017.App.Entry)e.Item.DataItem;

            LinkButton lnkBtn = null;
            Label      lbl    = null;
            HyperLink  lnk    = null;

            // Edit button
            lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnEdit");
            Security.SecureControlByHiding(lnkBtn);

            //((GridDataItem)e.Item)["Id"].Text = entry.Id.ToString();

            HiddenField hdfId = (HiddenField)e.Item.FindControl("hdfId");
            hdfId.Value = entry.Id.ToString();

            // market
            if (entry.CategoryMarket == "SM")
            {
                ((GridDataItem)e.Item)["CategoryMarket"].Text = "Single Market";
            }
            else if (entry.CategoryMarket == "MM")
            {
                ((GridDataItem)e.Item)["CategoryMarket"].Text = "Multi Market";
            }
            ((GridDataItem)e.Item)["CategoryMarket"].Text = entry.CategoryPSDetail;


            ((GridDataItem)e.Item)["Status"].Text = GeneralFunction.GetEntryStatusForAdmin(entry.Status);

            string ProcessingStatus = entry.ProcessingStatus;
            if (entry.ProcessingStatus == StatusEntry.Completed)
            {
                ProcessingStatus = "Completed";
            }
            else
            {
                ProcessingStatus = GeneralFunction.GetEntryStatusForAdmin(entry.ProcessingStatus);
            }

            ((GridDataItem)e.Item)["ProcessingStatus"].Text = "<span style='font-weight: bold;'>" + ProcessingStatus + "</span>";


            // Status
            if (entry.Status == StatusEntry.Completed)
            {
                ((GridDataItem)e.Item)["Status"].Text = "<span style=\"font-weight:bold\">" + GeneralFunction.GetEntryStatus(entry.Status) + "</span>";
            }
            if (entry.WithdrawnStatus != "")
            {
                ((GridDataItem)e.Item)["Status"].Text += "<br/><span style=\"color:Red;\">" + GeneralFunction.GetWithdrawnStatus(entry.WithdrawnStatus) + "</span>";
            }

            Administrator administrator = AdministratorList.GetAdministratorList().Where(x => x.Id == entry.AdminidAssignedto).FirstOrDefault();
            try
            {
                ((GridDataItem)e.Item)["AdminidAssignedto"].Text = administrator.LoginId;;
            }
            catch
            {
                ((GridDataItem)e.Item)["AdminidAssignedto"].Text = "";
            }


            // submitted by
            lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnBuSubmittedBy");
            Registration reg = GeneralFunction.GetRegistrationFromEntry(entry);
            lnkBtn.Text = "-";
            if (reg != null)
            {
                lnkBtn.Text            = GeneralFunction.GetRegistrationFromEntry(entry).Company;
                lnkBtn.CommandArgument = reg.Id.ToString();

                // Changes by Shaik for adding new columns on 19 Oct 2015
                ((GridDataItem)e.Item)["Firstname"].Text = reg.Firstname;
                ((GridDataItem)e.Item)["Lastname"].Text  = reg.Lastname;
            }


            // submitted details
            lbl      = (Label)e.Item.FindControl("lblSubmittedDetails");
            lbl.Text = reg.Firstname + " " + reg.Lastname + "<br/>" + reg.Job + "<br/>" + GeneralFunction.ShowFriendlyContact(reg.Contact) + "<br/>" + reg.Email;

            // chkboxes
            CheckBox chkbox = (CheckBox)e.Item.FindControl("chkbox");
            Security.SecureControlByHiding(chkbox);

            //Edit By Rico, Nov 28 2013, Extra Collumn for Countr and Date Reminder
            ((GridDataItem)e.Item)["Country"].Text = reg.Country;


            CheckBox checkbox = (CheckBox)e.Item.FindControl("chkbox");
            if (checkbox != null)
            {
                checkbox.Visible = true;
            }
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #27
0
    protected void radGridEntry_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Effie2017.App.Entry entry = (Effie2017.App.Entry)e.Item.DataItem;

            LinkButton lnkBtn = null;
            Label      lbl    = null;
            HyperLink  lnk    = null;

            //((GridDataItem)e.Item)["DateSubmitted"].Text = entry.DateSubmitted.ToString("MM/dd/yy hh:mm:ss tt");

            if (entry.CategoryMarket == "SM")
            {
                ((GridDataItem)e.Item)["CategoryMarket"].Text = "Single Market";
            }
            else if (entry.CategoryMarket == "MM")
            {
                ((GridDataItem)e.Item)["CategoryMarket"].Text = "Multi Market";
            }
            ((GridDataItem)e.Item)["CategoryMarket"].Text = entry.CategoryPSDetail;

            ((GridDataItem)e.Item)["Status"].Text   = GeneralFunction.GetEntryStatusForAdmin(entry.Status);
            ((GridDataItem)e.Item)["Deadline"].Text = entry.Deadline;

            // Status
            if (entry.Status == StatusEntry.Completed)
            {
                ((GridDataItem)e.Item)["Status"].Text = "<span style=\"font-weight:bold\">" + GeneralFunction.GetEntryStatus(entry.Status) + "</span>";
            }
            if (entry.WithdrawnStatus != "")
            {
                ((GridDataItem)e.Item)["Status"].Text += "<br/><span style=\"color:Red;\">" + GeneralFunction.GetWithdrawnStatus(entry.WithdrawnStatus) + "</span>";
            }

            // submitted by
            lnkBtn = (LinkButton)e.Item.FindControl("lnkBtnBuSubmittedBy");
            Registration reg = GeneralFunction.GetRegistrationFromEntry(entry);
            lnkBtn.Text = "-";
            if (reg != null)
            {
                lnkBtn.Text            = GeneralFunction.GetRegistrationFromEntry(entry).Company;
                lnkBtn.CommandArgument = reg.Id.ToString();
            }


            // submitted details
            lbl      = (Label)e.Item.FindControl("lblSubmittedDetails");
            lbl.Text = reg.Firstname + " " + reg.Lastname + "<br/>" + reg.Job + "<br/>" + GeneralFunction.ShowFriendlyContact(reg.Contact) + "<br/>" + reg.Email;

            if (reg != null)
            {
                lnkBtn.Text            = GeneralFunction.GetRegistrationFromEntry(entry).Company;
                lnkBtn.CommandArgument = reg.Id.ToString();

                // Changes by Shaik for adding new columns on 19 Oct 2015
                ((GridDataItem)e.Item)["Firstname"].Text = reg.Firstname;
                ((GridDataItem)e.Item)["Lastname"].Text  = reg.Lastname;
                ((GridDataItem)e.Item)["Country"].Text   = reg.Country;
            }

            if (File.Exists(System.Configuration.ConfigurationSettings.AppSettings["storagePhysicalPath"] + "EntryUpload\\CreativeVideo\\" + entry.Serial + "_CreativeMaterials_Video.mp4"))
            {
                lnkBtn                 = (LinkButton)e.Item.FindControl("lnkDownloadVideo");
                lnkBtn.Visible         = true;
                lnkBtn.CommandArgument = entry.Id.ToString();
            }


            ((GridDataItem)e.Item)["IsVideoDownloaded"].Text = entry.IsVideoDownloaded ? "Yes" : "No";
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.FindItemByValue(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #28
0
    protected void radGridEntry_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
        {
            Score score = (Score)e.Item.DataItem;
            EffieJuryManagementApp.Jury jury = GeneralFunction.GetAllJuryCache(true, round).Where(x => x.Id == score.Juryid).FirstOrDefault();

            LinkButton lnkBtn, lnkBtn2 = null;
            Label      lbl   = null;
            HyperLink  lnk   = null;
            Entry      entry = GeneralFunction.GetEntryFromIDCache(score.EntryId);
            if (entry != null)
            {
                // Entry Id
                lbl      = (Label)e.Item.FindControl("lbSerial");
                lbl.Text = entry.Serial;


                // Title
                lbl      = (Label)e.Item.FindControl("lbTitle");
                lbl.Text = entry.Campaign;

                lbl      = (Label)e.Item.FindControl("lbClient");
                lbl.Text = entry.Client;

                // Categories
                lbl = (Label)e.Item.FindControl("lbCategory");
                //lbl.Text = GeneralFunction.GetEntryMarket(entry.CategoryMarket) + "<br/>" + entry.CategoryPSDetail;
                lbl.Text = entry.CategoryPSDetail;


                // submitted by
                lbl = (Label)e.Item.FindControl("lnkBtnBuSubmittedBy");
                Registration reg = GeneralFunction.GetRegistrationFromEntry(entry);
                lbl.Text = "-";
                if (reg != null)
                {
                    lbl.Text = reg.Company;
                    //lnkBtn.CommandArgument = reg.Id.ToString();
                }

                // Country
                lbl      = (Label)e.Item.FindControl("lbCountry");
                lbl.Text = "-";
                if (reg != null)
                {
                    lbl.Text = reg.Country;
                }
            }

            if (jury != null)
            {
                List <JuryPanelCategory> jcpList = GeneralFunction.GetJuryPanelCategoryFromCategoryPS(entry.CategoryMarketFromRound(round), entry.CategoryPSFromRound(round), entry.CategoryPSDetailFromRound(round), round);
                // Panel
                lbl = (Label)e.Item.FindControl("lbPanel");
                if (jcpList.Count > 0)
                {
                    lbl.Text = jcpList[0].PanelId;
                }

                // Jury
                lbl      = (Label)e.Item.FindControl("lbJuryId");
                lbl.Text = jury.SerialNo;
                lbl      = (Label)e.Item.FindControl("lbJuryName");
                lbl.Text = jury.FirstName + " " + jury.LastName;
                lbl      = (Label)e.Item.FindControl("lbJuryTitle");
                lbl.Text = jury.Designation;
                lbl      = (Label)e.Item.FindControl("lbJuryCompany");
                lbl.Text = jury.Company;
                //lbl = (Label)e.Item.FindControl("lbJuryNetwork");
                //lbl.Text = jury.Network;
                //if (jury.Network == "Others") lbl.Text += "-" + jury.NetworkOthers;
                //lbl = (Label)e.Item.FindControl("lbJuryHoldingCompany");
                //lbl.Text = jury.HoldingCompany;
                if (jury.HoldingCompany == "Others")
                {
                    lbl.Text += "-" + jury.HoldingCompanyOthers;
                }
                lbl      = (Label)e.Item.FindControl("lbJuryCountry");
                lbl.Text = jury.Country;
            }



            //// Flag
            lbl      = (Label)e.Item.FindControl("lbJuryFlag");
            lbl.Text = score.IsRecuse ? "Jury Recusal" : score.Flag;
            lbl      = (Label)e.Item.FindControl("lbJuryFlagReason");
            lbl.Text = score.FlagOthers;
            //lbl = (Label)e.Item.FindControl("lbJuryRecuseFlag");
            //lbl.Text = "Yes";
            //if (!score.IsRecuse) lbl.Text = "No";
            lbl      = (Label)e.Item.FindControl("lbJuryRecuseReason");
            lbl.Text = score.RecuseRemarks;


            lbl      = (Label)e.Item.FindControl("lbDateSubmitted");
            lbl.Text = "";
            if (score.DateSubmitted != DateTime.MinValue)
            {
                lbl.Text = score.DateSubmitted.ToString("dd/MM/yy");
            }

            //Action
            lnkBtn = (LinkButton)e.Item.FindControl("lnkScore");
            if (score != null)
            {
                lnkBtn.CommandArgument = score.Id.ToString();
                lnkBtn.Visible         = true;
            }


            //// chkboxes
            //CheckBox chkbox = (CheckBox)e.Item.FindControl("chkbox");
            //Security.SecureControlByHiding(chkbox);
        }
        else if (e.Item.ItemType == GridItemType.Pager)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            //PageSizeCombo.Items.Add(new RadComboBoxItem("20", "20"));
            //PageSizeCombo.FindItemByText("20").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("50", "50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("100", "100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("200", "200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            PageSizeCombo.Items.Add(new RadComboBoxItem("All", "99999"));
            PageSizeCombo.FindItemByText("All").Attributes.Add("ownerTableViewId", radGridEntry.MasterTableView.ClientID);
            string PageSize = e.Item.OwnerTableView.PageSize.ToString();
            PageSizeCombo.FindItemByValue(PageSizeDefault.ToString()).Selected = true;
        }
    }
    protected void rgAdminLogIn_ItemDataBound(object sender, GridItemEventArgs e)
    {
        Generatepassword();
        LoginActivation();
        if (e.Item is GridCommandItem)
        {
            GridCommandItem commandItem = (GridCommandItem)e.Item;
            commandItem.FindControl("InitInsertButton").Visible   = false;
            commandItem.FindControl("AddNewRecordButton").Visible = false;
        }

        if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Account")
        {
            if (e.Item is GridDataItem)
            {
                GridDataItem item      = (GridDataItem)e.Item;
                ImageButton  lnkDelete = (ImageButton)item.FindControl("lnkDelete");
                lnkDelete.OnClientClick = "javascript:return confirm('Are you sure you want to delete " + item["Name"].Text + "?');";
                LinkButton lnkActivation = (LinkButton)item.FindControl("lnkActivation");
                lnkActivation.OnClientClick = "javascript:return confirm('Are you sure you want to " + item["IsActivated"].Text + " " + item["Name"].Text + "?');";
            }
        }

        if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Account")
        {
            GridDataItem dataItem   = e.Item as GridDataItem;
            GridDataItem parentItem = dataItem.OwnerTableView.ParentItem;

            HyperLink  hlnkAutoLogin = dataItem["AutoLogin"].Controls[1] as HyperLink;
            LinkButton lnkActivate   = dataItem["Activation"].Controls[1] as LinkButton;
            if (lnkActivate.Text == "Activate")
            {
                hlnkAutoLogin.Enabled = false;
            }
            else
            {
                hlnkAutoLogin.Enabled = true;
            }
        }

        if (e.Item is GridPagerItem)
        {
            RadComboBox PageSizeCombo = (RadComboBox)e.Item.FindControl("PageSizeComboBox");

            PageSizeCombo.Items.Clear();
            PageSizeCombo.Items.Add(new RadComboBoxItem("50"));
            PageSizeCombo.FindItemByText("50").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("100"));
            PageSizeCombo.FindItemByText("100").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("200"));
            PageSizeCombo.FindItemByText("200").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("300"));
            PageSizeCombo.FindItemByText("300").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("400"));
            PageSizeCombo.FindItemByText("400").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("500"));
            PageSizeCombo.FindItemByText("500").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("750"));
            PageSizeCombo.FindItemByText("750").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);

            PageSizeCombo.Items.Add(new RadComboBoxItem("1000"));
            PageSizeCombo.FindItemByText("1000").Attributes.Add("ownerTableViewId", rgAdminLogIn.MasterTableView.ClientID);
            PageSizeCombo.FindItemByText(e.Item.OwnerTableView.PageSize.ToString()).Selected = true;
        }
    }
Exemple #30
0
        /// <summary>
        /// 设置选中的文本
        /// </summary>
        /// <param name="box"></param>
        /// <param name="text">文本</param>
        public static RadComboBoxItem SetSelectedText(this RadComboBox box, string text)
        {
            RadComboBoxItem item = box.FindItemByText(text);

            return(SetSelected(box, item));
        }