Esempio n. 1
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;
        }
Esempio n. 2
0
        protected void LoadData()
        {
            Topic  topic    = new Topic();
            string topicId  = Page.RouteData.Values["TopicId1"] != null ? Page.RouteData.Values["TopicId1"].ToString() : Request.QueryString["TopicId"];
            string topicId2 = Page.RouteData.Values["TopicId2"] != null ? Page.RouteData.Values["TopicId2"].ToString() : Request.QueryString["TopicId2"];

            if (topicId2 != null)
            {
                topicId = topicId2;
            }
            if (topicId == null)
            {
                return;
            }
            int index = topicId.IndexOf("/");

            if (index > 0)
            {
                topicId = topicId.Substring(0, index);
            }
            topic     = TopicCollection.GetTopic(topicId);
            TopicName = topic.Name;
            TopicId   = topic.Id.ToString();
            if (ListArticle.Count() <= 10)
            {
                pnPager.Visible = false;
            }
            IEnumerable <Article> ilist = ListArticle.Skip(CurrentPage * RPP);

            ilist = ilist.Take(CurrentPage * RPP + RPP > TotalRecord ? TotalRecord % RPP : RPP);
            RadListView1.DataSource = ilist;
            RadListView1.DataBind();
            UserLogin.TopicId = topicId;
        }
Esempio n. 3
0
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        using (SqlConnection conn = new SqlConnection(strSQLconnection))
        {
            conn.Open();

            using (SqlCommand cmd = new SqlCommand("SELECT id,image, rank, name,appointment ,countryName,countryImage FROM RNID_M_members INNER JOIN RNID_T_tagEvents ON RNID_T_tagEvents.receivedTagId = RNID_M_members.receivedTagId  INNER JOIN HRIS_M_country ON HRIS_M_country.countryCode = RNID_M_members.countryCode GROUP BY id,image, rank, name,appointment ,countryName,countryImage order by id asc", conn))
            {
                using (SqlDataReader reader = cmd.ExecuteReader())
                {
                    reader.Read();
                    RadListView1.DataSource = reader;
                    RadListView1.DataBind();
                    reader.Close();
                }
            }

            using (SqlCommand cmd = new SqlCommand("select count(*) from RNID_T_tagEvents", conn))
            {
                using (SqlDataReader reader = cmd.ExecuteReader())
                {
                    reader.Read();
                    int numRec1 = Convert.ToInt32(reader[0]);
                    lblCount.Text = numRec1.ToString();
                    reader.Close();
                }
            }
        }
    }
Esempio n. 4
0
    private void Facebook_ListFriends(string pAccessToken)
    {
        string username = "******";
        //string dataType = "friends";
        string dataType      = "likes";
        string urlGetFriends = "https://graph.facebook.com/" + username + "/" + dataType + "?access_token=" + pAccessToken;
        string jsonFriends   = RequestResponse(urlGetFriends);

        if (jsonFriends == "")
        {
            Response.Write("<br /><br />urlGetFriends have problems");
            return;
        }
        Friends       friends = JsonConvert.DeserializeObject <Friends>(jsonFriends); //we write the Friends class later
        List <Friend> frds    = new List <Friend>();

        //lbluser.Text = friends.data.Count().ToString()+" ";
        foreach (Friend friend in friends.data) //we write the Friend class later
        {
            Friend frd = new Friend();
            frd.name  = friend.name;
            frd.id    = friend.id;
            frd.image = string.Format("https://graph.facebook.com/{0}/picture", friend.id);
            frds.Add(frd);
            //Response.Write("<br />" + friend.name);
        }
        RadListView1.DataSource = frds;
        RadListView1.DataBind();
    }
Esempio n. 5
0
    protected void FileImageAlbum_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        var FileImageAlbum = (RadAsyncUpload)sender;
        //var Parent = FileImageAlbum.NamingContainer;
        //var ProductID = ((HiddenField)Parent.FindControl("hdnProductID")).Value;
        var ProductOptionCategoryID = string.IsNullOrEmpty(Request.QueryString["poi"]) ? "" : Request.QueryString["poi"];
        //var RadListView1 = (RadListView)Parent.FindControl("RadListView1");
        //var RadListView2 = (RadListView)Parent.FindControl("RadListView2");


        string newName      = Guid.NewGuid().GetHashCode().ToString("X") + e.File.GetExtension();
        string targetFolder = "~/res/productoption/" + newName;

        e.File.SaveAs(Server.MapPath(targetFolder));

        string bgColor = "#ffffff";

        ResizeCropImage.CreateThumbNailWithBackGroundColor("~/res/productoption/", "~/res/productoption/thumbs/", newName, 95, 96, bgColor);
        ResizeCropImage.ResizeWithBackGroundColor(targetFolder, 486, 487, bgColor);

        //ResizeCropImage.ResizeByCondition(targetFolder + newName, 800, 800);
        //ResizeCropImage.CreateThumbNailByCondition("~/res/productoption/", "~/res/productoption/thumbs/", newName, 120, 120);

        if (string.IsNullOrEmpty(ProductOptionCategoryID))
        {
            TempImage.Rows.Add(new object[] { newName });

            RadListView1.DataSource = TempImage;
            RadListView1.DataBind();
        }
        else
        {
            var oProductOption = new ProductOption();

            oProductOption.ProductOptionInsert(newName,
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               "",
                                               ProductOptionCategoryID,
                                               "1",
                                               "0",
                                               "0",
                                               "1",
                                               "",
                                               ""
                                               );
            RadListView1.DataBind();
        }
    }
Esempio n. 6
0
    protected void RadListView1Bagla()
    {
        EFDal   ed        = new EFDal();
        DataSet ds        = new DataSet();
        int     BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name);

        ds = ed.kal_IsDetayi(BolgeKodu);
        RadListView1.DataSource = ds;
        RadListView1.DataBind();
        lblKayitSayisi.Text = ds.Tables[0].Rows.Count.ToString() + " adet kayıt bulundu";
    }
Esempio n. 7
0
        protected void LoadComment()
        {
            Guid subId = SessionHelper.GetSession(SessionKey.SubDomain) == string.Empty ? Guid.Empty : new Guid(SessionHelper.GetSession(SessionKey.SubDomain));

            if (HttpContext.Current.User.IsInRole(GroupAdmin))
            {
                if (subId == Guid.Empty)
                {
                    RadListView1.DataSource = listCommentUnPublic;
                    dem = listCommentUnPublic.Count;
                }
                else
                {
                    SubDomain subDomain = new SubDomain {
                        Id = subId
                    };
                    PageCollection pageList = subDomain.GetPagesBelongTo();
                    PSCPortal.CMS.ArticleCommentCollection commentListDisplay = new PSCPortal.CMS.ArticleCommentCollection();
                    foreach (Page page in pageList)
                    {
                        PSCPortal.CMS.ArticleCommentCollection commentList = PSCPortal.CMS.ArticleCommentCollection.GetListArticleCommentByPageId(page.Id.ToString());
                        foreach (PSCPortal.CMS.ArticleComment comment in commentList)
                        {
                            commentListDisplay.Add(comment);
                        }
                    }
                    dem = commentListDisplay.Count;
                    RadListView1.DataSource = commentListDisplay;
                }
            }
            else
            {
                SubDomain subDomain = new SubDomain {
                    Id = subId
                };
                PageCollection pageList = subDomain.GetPagesBelongTo();
                PSCPortal.CMS.ArticleCommentCollection commentListDisplay = new PSCPortal.CMS.ArticleCommentCollection();
                foreach (Page page in pageList)
                {
                    PSCPortal.CMS.ArticleCommentCollection commentList = PSCPortal.CMS.ArticleCommentCollection.GetListArticleCommentByPageId(page.Id.ToString());
                    foreach (PSCPortal.CMS.ArticleComment comment in commentList)
                    {
                        commentListDisplay.Add(comment);
                    }
                }
                dem = commentListDisplay.Count;
                RadListView1.DataSource = commentListDisplay;
            }
            RadListView1.DataBind();
        }
Esempio n. 8
0
        private void BindData()
        {
            dtfInfo = DateTimeFormatInfo.InvariantInfo;
            MODEL.Criteria.reqKitchen req = new MODEL.Criteria.reqKitchen();
            req.foodStatusID = "1";
            req.restaurantID = hdRestaurantID.Value;///Session["session_restaurantID"].ToString().Trim();
            req.currentDate  = DateTime.Today.ToString("MM/dd/yyyy", dtfInfo);

            List <MODEL.FoodView> model = new List <MODEL.FoodView>();

            DAL.Restaurant sv = new DAL.Restaurant();
            model = sv.getFoodsViewForKitchen(req);
            this.RadListView1.DataSource = model;
            RadListView1.DataBind();
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdRestaurantID.Value = getRestaurantID();
                hdMemberID.Value     = getMemberID();
                dtfInfo = DateTimeFormatInfo.InvariantInfo;
                MODEL.Criteria.reqKitchen req = new MODEL.Criteria.reqKitchen();
                req.foodStatusID = "1";
                req.restaurantID = hdRestaurantID.Value;//Session["session_restaurantID"].ToString().Trim();
                req.currentDate  = DateTime.Today.ToString("MM/dd/yyyy", dtfInfo);

                List <MODEL.FoodView> model = new List <MODEL.FoodView>();
                DAL.Restaurant        sv    = new DAL.Restaurant();
                model = sv.getCashierView(req);
                this.RadListView1.DataSource = model;
                RadListView1.DataBind();
            }
        }
Esempio n. 10
0
    //private void PopulateData()
    //{
    //    if (!IsPostBack)
    //    {
    //        BindData();

    //    }
    //    else
    //    {
    //        BindData();
    //    }

    //    if (UserController.GetCurrentUserInfo().IsInRole("Administrators") ||
    //                  UserController.GetCurrentUserInfo().IsInRole("NexsoSupport"))
    //    {
    //        BindData();
    //    }
    //}

    /// <summary>
    /// Obtener lista de elementos (respuesta) para los pasos 2 a 5 del asistente
    /// </summary>
    private void BindData()
    {
        var list = ListComponent.GetListPerCategory("Theme", Thread.CurrentThread.CurrentCulture.Name).ToList();

        RadListView1.DataSource = list.Where(x => !x.Key.Contains("ctm_")).ToList();
        RadListView1.DataBind();

        list = ListComponent.GetListPerCategory("Beneficiaries", Thread.CurrentThread.CurrentCulture.Name).ToList();
        RadListView2.DataSource = list;
        RadListView2.DataBind();

        list = ListComponent.GetListPerCategory("Sector", Thread.CurrentThread.CurrentCulture.Name).ToList();
        RadListView3.DataSource = list;
        RadListView3.DataBind();

        list = ListComponent.GetListPerCategory("WhoAreYou", Thread.CurrentThread.CurrentCulture.Name).ToList();
        RadListView4.DataSource = list;
        RadListView4.DataBind();

        //If users is login load the list with its answer
        if (userId >= 0)
        {
            if (!IsPostBack)
            {
                SetChkControl("Theme", RadListView1);
                SetChkControl("Beneficiaries", RadListView2);
                SetChkControl("Sector", RadListView3);
                SetChkControl("WhoAreYou", RadListView4);
                txtEmail.Text     = currentUser.Email;
                txtFirstName.Text = WebUtility.HtmlDecode(currentUser.FirstName);
                txtLastName.Text  = WebUtility.HtmlDecode(currentUser.LastName);
                CountryStateCityEditMode.SelectedCity    = userPropertyComponent.UserProperty.City;
                CountryStateCityEditMode.SelectedCountry = userPropertyComponent.UserProperty.Country;
                CountryStateCityEditMode.SelectedState   = userPropertyComponent.UserProperty.Region;
                CountryStateCityEditMode.SelectedAddress = userPropertyComponent.UserProperty.Address;
                CountryStateCityEditMode.UpdateMap();
            }
        }
        SetupWizard(Wizard1.ActiveStepIndex);
    }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List <M_Table> model = new List <M_Table>();
                M_Table        data;
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M1";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);

                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);

                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X1";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X2";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X2";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X3";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X4";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);
                data            = new M_Table();
                data.tableName  = "X5";
                data.menu       = "M2";
                data.menuStatus = "Wait";
                data.price      = 9500;
                model.Add(data);

                this.RadListView1.DataSource = model;
                RadListView1.DataBind();
            }
        }
Esempio n. 12
0
 protected void btnLoadMore_Click(object sender, EventArgs e)
 {
     RadListView1.PageSize += 5;
     RadListView1.DataBind();
 }