Exemple #1
0
 protected void RadGridPatients_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
 {
     // form template is in insert mode
     if (e.Item is GridEditFormInsertItem && RadGridPatients.MasterTableView.IsItemInserted)
     {
         // fill in drop down lists with data
         RadComboBox cmbCities = e.Item.FindControl("cmbCities") as RadComboBox;
         cmbCities.DataSource = getCities();
         cmbCities.DataBind();
         RadComboBox cmbNationalities = e.Item.FindControl("cmbNationalities") as RadComboBox;
         cmbNationalities.DataSource = getNationalities();
         cmbNationalities.DataBind();
         ImageButton btnAddProcess = e.Item.FindControl("btnAddProcess") as ImageButton;
         btnAddProcess.Visible = false;
     }
     else // form template is in edit mode
     if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
     {
         // fill in drop down lists with data
         RadComboBox cmbCities = e.Item.FindControl("cmbCities") as RadComboBox;
         cmbCities.DataSource = getCities();
         cmbCities.DataBind();
         RadComboBox cmbNationalities = e.Item.FindControl("cmbNationalities") as RadComboBox;
         cmbNationalities.DataSource = getNationalities();
         cmbNationalities.DataBind();
         // get patient city id from the edited item
         GridEditableItem editItem = (GridEditableItem)e.Item;
         cmbCities.SelectedValue        = editItem.GetDataKeyValue("patientCityID").ToString();
         cmbNationalities.SelectedValue = editItem.GetDataKeyValue("patientnatid").ToString();
         RadComboBox cmbProcessTypes = e.Item.FindControl("cmbProcessTypes") as RadComboBox;
         cmbProcessTypes.DataSource = getprocessTypes();
         cmbProcessTypes.DataBind();
         RadDatePicker dpProcessDate = e.Item.FindControl("dpProcessDate") as RadDatePicker;
         dpProcessDate.MinDate = System.DateTime.Now;
         RadComboBox cmbOrganizations = e.Item.FindControl("cmbOrganizations") as RadComboBox;
         cmbOrganizations.DataSource = getOrganizations();
         cmbOrganizations.DataBind();
         Panel            PatientProcessMedicine     = e.Item.FindControl("PatientProcessMedicine") as Panel;
         RadListView      RadListViewPatientRegister = e.Item.FindControl("RadListViewPatientRegister") as RadListView;
         RadListView      RadListViewPatientMedicine = e.Item.FindControl("RadListViewPatientMedicine") as RadListView;
         GridEditableItem dataItem = e.Item as GridEditableItem;
         int PatientId             = Convert.ToInt32(dataItem.GetDataKeyValue("patientId"));
         if (getPatientRegistrationsCount(PatientId) > 0)
         {
             PatientProcessMedicine.Visible        = true;
             RadListViewPatientRegister.DataSource = getPatientRegisterationsById(PatientId);
             RadListViewPatientMedicine.DataBind();
             RadListViewPatientMedicine.DataSource = getMedicinesById(PatientId);
             RadListViewPatientMedicine.DataBind();
         }
     }
 }
Exemple #2
0
        protected void btnOtherClasess_Click(object sender, EventArgs e)
        {
            lblstcode.Text = Session[sessionNames.userID_StudentOstad].ToString();
            LinkButton lnk       = sender as LinkButton;
            String     ClassCode = lnk.Attributes["CustomParameter"].ToString();

            if ((clsB.Show_similarClass_List(ClassCode, lblstcode.Text)).Count != 0)
            {
                string scrp = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
                ScriptManager.RegisterStartupScript(this.Page, GetType(), ClientID, scrp, true);


                RadListView1.DataSource = clsB.Show_similarClass_List(ClassCode, lblstcode.Text);
                RadListView1.DataBind();
                foreach (RadListViewItem lvi in RadListView1.Items)
                {
                    RadListView lstAsset   = (RadListView)lvi.FindControl("radListView4");
                    Label       ClassCode1 = (Label)lvi.FindControl("ClassCode1");
                    var         classCode  = (ClassCode1.Text);
                    var         term       = ConfigurationManager.AppSettings["Term"].ToString();
                    lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode(classCode, term);
                    lstAsset.DataBind();
                    if (RadListView1.Items.Count > 0)
                    {
                        btn_Select.Visible = true;
                    }
                }
            }
            else
            {
                rwm_Validations.RadAlert("کلاس مشابه در این ترم وجود ندارد", null, 100, "پیام", "");
            }

            Session[sessionNames.userID_StudentOstad] = lblstcode.Text;
        }
Exemple #3
0
        protected void grdShopping_DeleteCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            Reports rpt = new Reports();
            int     sum = 0;

            downloadreq.DeleteDownloadReq(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["RequestID"]));
            List <ReportDownloadReqDTO> lstdnl = new List <ReportDownloadReqDTO>();

            lstdnl = rpt.Get_SelectedAsset_NotPay(Session[sessionNames.userID_StudentOstad].ToString());
            grdShopping.DataSource = lstdnl;
            grdShopping.DataBind();
            RadListView lst = (RadListView)ContentPlaceHolder1.FindControl("lstSelectedClass");

            if (lst != null)
            {
                lst.DataSource = lstdnl;
                lst.DataBind();
            }
            //Pages.ConfirmCheckList chk = new Pages.ConfirmCheckList();
            //RadListView lst = (RadListView)chk.FindControl("lstClass");
            //lst.DataSource = lstdnl;
            //lst.DataBind();
            foreach (GridDataItem item in grdShopping.MasterTableView.Items)
            {
                if (grdShopping.MasterTableView.Items.Count > 0)
                {
                    Paybtn.Visible = true;
                }
                if (grdShopping.Columns[3].UniqueName == "SumPrice")
                {
                    sum += int.Parse(item["SumPrice"].Text.Replace(",", ""));
                }
            }
            Session["Fee"] = sum.ToString();
        }
Exemple #4
0
        private void ItemsListControl_ItemDataBound(object sender, RadListViewItemEventArgs e)
        {
            if (e.Item.ItemType != RadListViewItemType.DataItem && e.Item.ItemType != RadListViewItemType.AlternatingItem)
            {
                return;
            }

            RealEstateItem item = ((RadListViewDataItem)e.Item).DataItem as RealEstateItem;

            if (item == null)
            {
                return;
            }

            System.Web.UI.WebControls.Image photo = (System.Web.UI.WebControls.Image)e.Item.FindControl("Photo");

            if (isThumbView)
            {
                photo.ImageUrl = item.GetPhotoUrl(SinglePhotoType.ThumbnailListPhoto);
            }
            else
            {
                photo.ImageUrl = item.GetPhotoUrl(SinglePhotoType.FlowListPhoto);
            }

            RadListView FeaturesList = (RadListView)e.Item.FindControl("FeaturesList");

            FeaturesList.ItemDataBound += new EventHandler <RadListViewItemEventArgs>(FeaturesList_ItemDataBound);
            FeaturesList.DataSource     = item.GetTaxons <FlatTaxon>(TaxonType.Features);
            FeaturesList.DataBind();
        }
Exemple #5
0
        protected void dlAudits_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                int         rms_audit_id = Convert.ToInt32(dlAudits.DataKeys[e.Item.ItemIndex]);
                RadListView rlv          = (RadListView)e.Item.FindControl("rlvAuditDocs");

                rlv.DataSource = db.AuditDocuments.Where(p => p.rms_audit_id == rms_audit_id).Select(p => new { rms_audit_document_id = p.rms_audit_document_id, document_nm = p.document_nm }).ToList();
                rlv.DataBind();
            }
        }
Exemple #6
0
        protected void rgAudits_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if ("Records".Equals(e.Item.OwnerTableView.Name))
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;

                    int rms_audit_record_id = Convert.ToInt32(item.GetDataKeyValue("rms_audit_record_id"));
                    var audit_rec           = db.AuditRecords.FirstOrDefault(p => p.rms_audit_record_id == rms_audit_record_id);

                    HyperLink hlAnalysisNotes = (HyperLink)item.FindControl("hlAnalysisNotes");
                    hlAnalysisNotes.NavigateUrl = String.Format("javascript:OpenPopup('Modal/ReportPopup.aspx?view=analysisnotesbydaterange&rms_record_id={0}&beg_dt={1:MM/dd/yyyy}&end_dt={2:MM/dd/yyyy}')", audit_rec.rms_record_id, audit_rec.Audit.audit_beg_dt, audit_rec.Audit.audit_end_dt);
                }
            }
            else
            {
                if (e.Item is GridDataItem)
                {
                    GridDataItem item = (GridDataItem)e.Item;

                    int       rms_audit_id = Convert.ToInt32(item.GetDataKeyValue("rms_audit_id"));
                    var       audit        = db.Audits.FirstOrDefault(p => p.rms_audit_id == rms_audit_id);
                    HyperLink hlEditAudit  = (HyperLink)item.FindControl("hlEditAudit");

                    hlEditAudit.NavigateUrl = String.Format("../Task/Audit.aspx?rms_audit_id={0}", rms_audit_id);
                }

                if (e.Item.IsInEditMode)
                {
                    GridEditableItem edititem = (GridEditableItem)e.Item;

                    int rms_audit_id = Convert.ToInt32(edititem.GetDataKeyValue("rms_audit_id"));
                    var audit        = db.Audits.FirstOrDefault(p => p.rms_audit_id == rms_audit_id);

                    Literal     ltlType      = (Literal)edititem.FindControl("ltlAuditType");
                    Literal     ltlResults   = (Literal)edititem.FindControl("ltlAuditResults");
                    Literal     ltlReason    = (Literal)edititem.FindControl("ltlReason");
                    Literal     ltlData      = (Literal)edititem.FindControl("ltlData");
                    Literal     ltlFindings  = (Literal)edititem.FindControl("ltlFindings");
                    RadListView rlvAuditDocs = (RadListView)edititem.FindControl("rlvAuditDocs");

                    rlvAuditDocs.DataSource = audit.AuditDocuments.Select(p => new { rms_audit_document_id = p.rms_audit_document_id, document_nm = p.document_nm }).OrderBy(p => p.document_nm);
                    rlvAuditDocs.DataBind();

                    ltlType.Text     = audit.AuditType.type + ": " + audit.AuditType.description;
                    ltlResults.Text  = audit.AuditResult.result + audit.AuditResult.description;
                    ltlReason.Text   = audit.audit_reason;
                    ltlData.Text     = audit.audit_data;
                    ltlFindings.Text = audit.audit_findings;
                }
            }
        }
 protected void rcbTerm_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
 {
     RadListView2.DataSource = clsB.Show_Class_List(Session[sessionNames.userID_StudentOstad].ToString(), rcbTerm.SelectedValue);
     RadListView2.DataBind();
     foreach (RadListViewItem lvi in RadListView2.Items)
     {
         RadListView lstAsset  = (RadListView)lvi.FindControl("RadListView3");
         Label       ClassCode = (Label)lvi.FindControl("ClassCode");
         lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode(ClassCode.Text, rcbTerm.SelectedValue);
         lstAsset.DataBind();
         if (RadListView2.Items.Count > 0)
         {
             btn_Select.Visible = true;
         }
     }
 }
        private void SlidesList_ItemDataBound(object sender, RadListViewItemEventArgs e)
        {
            if (e.Item.ItemType != RadListViewItemType.DataItem && e.Item.ItemType != RadListViewItemType.AlternatingItem)
            {
                return;
            }

            RadListViewDataItem dataItem = (RadListViewDataItem)e.Item;
            RealEstateItem      item     = (RealEstateItem)dataItem.DataItem;

            string sliderPhotoUrl     = item.GetPhotoUrl(SinglePhotoType.SliderPhoto);
            string sliderThumbnailUrl = item.GetPhotoUrl(SinglePhotoType.SliderThumbnail);

            if (sliderPhotoUrl.IsNullOrEmpty() || sliderThumbnailUrl.IsNullOrEmpty())
            {
                e.Item.Visible = false;
                return;
            }

            bool   isForSale      = item.IsForSale();
            string detailsPageUrl = this.GetDetailsPageUrl(isForSale);

            HyperLink hlDetails = (HyperLink)e.Item.FindControl("hlDetails");

            hlDetails.NavigateUrl = detailsPageUrl + this.RealEstateManager.GetItemUrl(item);

            Image imgSlider = (Image)e.Item.FindControl("imgSlider");

            imgSlider.AlternateText = item.Title;
            imgSlider.ImageUrl      = sliderPhotoUrl;

            Literal ltrAddress = (Literal)e.Item.FindControl("ltrAddress");

            ltrAddress.Text = item.Address;

            Literal ltrPrice = (Literal)e.Item.FindControl("ltrPrice");

            ltrPrice.Text = item.Price.ToString("n2");

            RadListView featuresList = (RadListView)e.Item.FindControl("FeaturesList");

            featuresList.ItemDataBound += new EventHandler <RadListViewItemEventArgs>(FeaturesList_ItemDataBound);
            featuresList.DataSource     = item.GetTaxons <FlatTaxon>(TaxonType.Features);
            featuresList.DataBind();
        }
 protected void txtAdonsList_ItemDataBound(object sender, RadListViewItemEventArgs e)
 {
     if (e.Item is RadListViewDataItem)
     {
         RadListViewDataItem item  = e.Item as RadListViewDataItem;
         AdOnTypeInProduct   obj   = item.DataItem as AdOnTypeInProduct;
         RadListView         adons = item.FindControl("txtAdons") as RadListView;
         Panel AdonHeading         = item.FindControl("AdonHeading") as Panel;
         Panel NoneFullHeading     = item.FindControl("NoneFullHeading") as Panel;
         adons.DataSource = obj.ProductAdons.OrderBy(pd => pd.Adon.AdOnName);
         adons.DataBind();
         if (obj.DisplayFormat == 1)
         {
             AdonHeading.Visible = true;
         }
         else if (obj.DisplayFormat == 4)
         {
             NoneFullHeading.Visible = true;
         }
     }
 }
        /// <summary>
        /// Handles the ItemDataBound event of the DetailsView control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="Telerik.Web.UI.RadListViewItemEventArgs"/> instance containing the event data.</param>
        private void DetailsView_ItemDataBound(object sender, RadListViewItemEventArgs e)
        {
            if (e.Item.ItemType != RadListViewItemType.DataItem && e.Item.ItemType != RadListViewItemType.AlternatingItem)
            {
                return;
            }

            RealEstateItem item = ((RadListViewDataItem)e.Item).DataItem as RealEstateItem;

            if (item == null)
            {
                return;
            }

            #region Contact Our Agent
            RadTabStrip  tabStrip           = (RadTabStrip)e.Item.FindControl("tabStrip");
            RadMultiPage multiPage          = (RadMultiPage)e.Item.FindControl("multiPage");
            RadTab       tabContactOurAgent = tabStrip.Tabs[5];

            if (tabContactOurAgent != null && !item.AgentId.Equals(Guid.Empty))
            {
                AgentItem agent = this.AgentsManager.GetAgent(item.AgentId);
                if (agent != null)
                {
                    tabContactOurAgent.NavigateUrl = AGENTS_PAGE + this.AgentsManager.GetItemUrl(agent);
                }
                else
                {
                    tabContactOurAgent.Visible     = false;
                    multiPage.PageViews[5].Visible = false;
                }
            }
            else
            {
                tabContactOurAgent.Visible     = false;
                multiPage.PageViews[5].Visible = false;
            }
            #endregion

            RadListView  rlvOverview       = (RadListView)e.Item.FindControl("rlvOverview");
            List <Photo> overviewTabPhotos = item.GetPhotos(MultiplePhotoType.OverviewTabPhoto);
            rlvOverview.DataSource = overviewTabPhotos;
            rlvOverview.DataBind();
            tabStrip.Tabs[0].Visible       = (overviewTabPhotos.Count > 0);
            multiPage.PageViews[0].Visible = tabStrip.Tabs[0].Visible;

            RadListView  rlvPhotos       = (RadListView)e.Item.FindControl("rlvPhotos");
            List <Photo> photosTabPhotos = item.GetPhotos(MultiplePhotoType.PhotosTabPhoto);
            rlvPhotos.DataSource = photosTabPhotos;
            rlvPhotos.DataBind();
            tabStrip.Tabs[1].Visible       = (photosTabPhotos.Count > 0);
            multiPage.PageViews[1].Visible = tabStrip.Tabs[1].Visible;

            RadListView  rlvPanaromicView       = (RadListView)e.Item.FindControl("rlvPanaromicView");
            List <Photo> panaromicViewTabPhotos = item.GetPhotos(MultiplePhotoType.PanaromicViewTabPhoto);
            rlvPanaromicView.DataSource = panaromicViewTabPhotos;
            rlvPanaromicView.DataBind();
            tabStrip.Tabs[2].Visible       = (panaromicViewTabPhotos.Count > 0);
            multiPage.PageViews[2].Visible = tabStrip.Tabs[2].Visible;

            RadListView  rlvFloorPlan       = (RadListView)e.Item.FindControl("rlvFloorPlan");
            List <Photo> floorPlanTabPhotos = item.GetPhotos(MultiplePhotoType.FloorPlanTabPhoto);
            rlvFloorPlan.DataSource = floorPlanTabPhotos;
            rlvFloorPlan.DataBind();
            tabStrip.Tabs[3].Visible       = (floorPlanTabPhotos.Count > 0);
            multiPage.PageViews[3].Visible = tabStrip.Tabs[3].Visible;

            if (item.Latitude <= 0 || item.Longitude <= 0)
            {
                tabStrip.Tabs[4].Visible       = false;
                multiPage.PageViews[4].Visible = false;
            }

            for (int i = 0; i < tabStrip.Tabs.Count; i++)
            {
                if (tabStrip.Tabs[i].Visible)
                {
                    tabStrip.SelectedIndex  = i;
                    multiPage.SelectedIndex = i;

                    this.Page.ClientScript.RegisterClientScriptBlock(
                        this.GetType(), "initialTabStripId",
                        string.Format("var initialTabStripId = '{0}';", multiPage.PageViews[i].ClientID), true);

                    break;
                }
            }

            Panel pnlPrice = (Panel)e.Item.FindControl("pnlPrice");
            pnlPrice.Controls.Clear();
            pnlPrice.Controls.Add(new Literal()
            {
                Text = item.Price.ToString("n2")
            });

            if (!item.Description.Value.IsNullOrEmpty())
            {
                PlaceHolder phDescription = (PlaceHolder)e.Item.FindControl("phDescription");
                phDescription.Visible = true;
            }

            #region Location
            FlatTaxon locationTaxon = item.GetTaxon <FlatTaxon>(TaxonType.Locations);
            if (locationTaxon != null)
            {
                Literal ltrLocation = (Literal)e.Item.FindControl("ltrLocation");

                ltrLocation.Text = locationTaxon.Title;
            }
            #endregion

            #region Item Type
            FlatTaxon itemTypeTaxon = item.GetTaxon <FlatTaxon>(TaxonType.Types);
            if (itemTypeTaxon != null)
            {
                PlaceHolder phItemType  = (PlaceHolder)e.Item.FindControl("phItemType");
                Literal     ltrItemType = (Literal)e.Item.FindControl("ltrItemType");

                ltrItemType.Text   = itemTypeTaxon.Title;
                phItemType.Visible = true;
            }
            #endregion

            #region Housing
            if (!item.Housing.IsNullOrEmpty())
            {
                PlaceHolder phHousing  = (PlaceHolder)e.Item.FindControl("phHousing");
                Literal     ltrHousing = (Literal)e.Item.FindControl("ltrHousing");
                ltrHousing.Text   = string.Format("{0} m<sup>2</sup>", item.Housing);
                phHousing.Visible = true;
            }
            #endregion

            #region Rooms
            if (!item.NumberOfRooms.IsNullOrEmpty())
            {
                PlaceHolder phRooms  = (PlaceHolder)e.Item.FindControl("phRooms");
                Literal     ltrRooms = (Literal)e.Item.FindControl("ltrRooms");
                ltrRooms.Text   = item.NumberOfRooms;
                phRooms.Visible = true;
            }
            #endregion

            #region Floors
            if (!item.NumberOfFloors.IsNullOrEmpty())
            {
                PlaceHolder phFloors  = (PlaceHolder)e.Item.FindControl("phFloors");
                Literal     ltrFloors = (Literal)e.Item.FindControl("ltrFloors");
                ltrFloors.Text   = item.NumberOfFloors;
                phFloors.Visible = true;
            }
            #endregion

            #region Built
            if (!item.YearBuilt.IsNullOrEmpty())
            {
                PlaceHolder phBuilt  = (PlaceHolder)e.Item.FindControl("phBuilt");
                Literal     ltrBuilt = (Literal)e.Item.FindControl("ltrBuilt");
                ltrBuilt.Text   = item.YearBuilt;
                phBuilt.Visible = true;
            }
            #endregion

            #region Payment
            if (item.Payment > 0)
            {
                PlaceHolder phPayment  = (PlaceHolder)e.Item.FindControl("phPayment");
                Literal     ltrPayment = (Literal)e.Item.FindControl("ltrPayment");
                ltrPayment.Text   = item.Payment.ToString("n2");
                phPayment.Visible = true;
            }
            #endregion

            #region MonthlyRate
            if (item.MonthlyRate > 0)
            {
                PlaceHolder phMonthlyRate  = (PlaceHolder)e.Item.FindControl("phMonthlyRate");
                Literal     ltrMonthlyRate = (Literal)e.Item.FindControl("ltrMonthlyRate");
                ltrMonthlyRate.Text   = item.MonthlyRate.ToString("n2");
                phMonthlyRate.Visible = true;
            }
            #endregion

            #region Net
            if (item.Net > 0)
            {
                PlaceHolder phNet  = (PlaceHolder)e.Item.FindControl("phNet");
                Literal     ltrNet = (Literal)e.Item.FindControl("ltrNet");
                ltrNet.Text   = item.Net.ToString("n2");
                phNet.Visible = true;
            }
            #endregion

            #region PriceSquareMeter
            if (item.PriceSquareMeter > 0)
            {
                PlaceHolder phPriceSquareMeter  = (PlaceHolder)e.Item.FindControl("phPriceSquareMeter");
                Literal     ltrPriceSquareMeter = (Literal)e.Item.FindControl("ltrPriceSquareMeter");
                ltrPriceSquareMeter.Text   = item.PriceSquareMeter.ToString("n2");
                phPriceSquareMeter.Visible = true;
            }
            #endregion

            RadListView FeaturesList = (RadListView)e.Item.FindControl("FeaturesList");
            FeaturesList.ItemDataBound += new EventHandler <RadListViewItemEventArgs>(FeaturesList_ItemDataBound);
            FeaturesList.DataSource     = item.GetTaxons <FlatTaxon>(TaxonType.Features);
            FeaturesList.DataBind();

            RadListView RoomsList = (RadListView)e.Item.FindControl("RoomsList");
            RoomsList.ItemDataBound += new EventHandler <RadListViewItemEventArgs>(RoomsList_ItemDataBound);
            RoomsList.DataSource     = item.GetTaxons <FlatTaxon>(TaxonType.Rooms);
            RoomsList.DataBind();

            #region Agent
            if (!item.AgentId.Equals(Guid.Empty))
            {
                AgentItem agent = this.AgentsManager.GetAgent(item.AgentId);

                if (agent != null)
                {
                    PlaceHolder phAgent = (PlaceHolder)e.Item.FindControl("phAgent");
                    phAgent.Visible = true;

                    Literal ltrAgentName = (Literal)e.Item.FindControl("ltrAgentName");
                    ltrAgentName.Text = agent.Title;


                    #region Address
                    if (!agent.Address.IsNullOrEmpty())
                    {
                        PlaceHolder phAgentAddress  = (PlaceHolder)e.Item.FindControl("phAgentAddress");
                        Literal     ltrAgentAddress = (Literal)e.Item.FindControl("ltrAgentAddress");
                        ltrAgentAddress.Text   = agent.Address;
                        phAgentAddress.Visible = true;
                    }
                    #endregion

                    #region PhoneNumber
                    if (!agent.PhoneNumber.IsNullOrEmpty())
                    {
                        PlaceHolder phAgentPhoneNumber  = (PlaceHolder)e.Item.FindControl("phAgentPhoneNumber");
                        Literal     ltrAgentPhoneNumber = (Literal)e.Item.FindControl("ltrAgentPhoneNumber");
                        ltrAgentPhoneNumber.Text   = agent.PhoneNumber;
                        phAgentPhoneNumber.Visible = true;
                    }
                    #endregion


                    #region Email
                    if (!agent.Email.IsNullOrEmpty())
                    {
                        PlaceHolder phAgentEmail = (PlaceHolder)e.Item.FindControl("phAgentEmail");
                        HyperLink   hlAgentEmail = (HyperLink)e.Item.FindControl("hlAgentEmail");
                        hlAgentEmail.Text        = agent.Email;
                        hlAgentEmail.NavigateUrl = tabContactOurAgent.NavigateUrl;
                        phAgentEmail.Visible     = true;
                    }
                    #endregion
                }
            }
            #endregion
        }
Exemple #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dtbedehi = new DataTable();
                //double bedehi;
                //dtbedehi = GovahiBusiness.GetBedehkar(Session[sessionNames.userID_StudentOstad].ToString());
                //bedehi = Convert.ToDouble((dtbedehi.Rows[0]["bedehi"].ToString()));
                //DataTable dtReg = new DataTable();
                //dtReg = GovahiBusiness.GetStRegisterd(Session[sessionNames.userID_StudentOstad].ToString());
                //DataTable dtnaghs = new DataTable();
                ////dtnaghs = logBusiness.StHasNaghs(Session["user"].ToString());
                DataTable dt = new DataTable();
                dt = logBusiness.GetStIdVaz(Session[sessionNames.userID_StudentOstad].ToString());

                //if (bedehi > 0)
                //{

                //    rwm_Validations.RadAlert("به علت بدهی شما دسترسی ندارید", null, 100, "خطا", "CallBackConfirm2");

                //}
                // if (dtnaghs.Rows.Count > 0)
                //{

                //    rwm_Validations.RadAlert("به دلیل نقص پرونده شما دسترسی ندارید", null, 100, "خطا", "CallBackConfirm2");

                //}

                //if (dtReg.Rows.Count == 0)
                //{

                //    rwm_Validations.RadAlert("به دلیل عدم ثبت نام در ترم جاری شما دسترسی ندارید", null, 100, "خطا", "CallBackConfirm2");

                //}



                if (dt.Rows[0]["idvazkol"].ToString() == "7")
                {
                    rwm_Validations.RadAlert("فارغ التحصیلان به این بخش دسترسی ندارند", null, 100, "خطا", "CallBackConfirm2");
                }


                else
                {
                    lblstcode.Text          = Session[sessionNames.userID_StudentOstad].ToString();
                    RadListView2.DataSource = clsB.Show_Class_List(lblstcode.Text, ConfigurationManager.AppSettings["Term"].ToString());
                    RadListView2.DataBind();

                    foreach (RadListViewItem lvi in RadListView2.Items)
                    {
                        RadListView lstAsset  = (RadListView)lvi.FindControl("RadListView3");
                        Label       ClassCode = (Label)lvi.FindControl("ClassCode");
                        lstAsset.DataSource = assetB.Show_Asset_List_ByClassCode((ClassCode.Text), ConfigurationManager.AppSettings["Term"].ToString());
                        lstAsset.DataBind();
                        //var Merge = lvi.FindControl("Merge_code");
                        //if (Merge != null)
                        //    btn_Select.Visible = false;
                        if (RadListView2.Items.Count > 0)
                        {
                            btn_Select.Visible = true;
                        }
                    }

                    Session[sessionNames.userID_StudentOstad] = lblstcode.Text;
                }
            }
        }