示例#1
0
    private void BindDateDDL()
    {
        DataTable dt = new DataTable();

        dt.Columns.Add("Date");
        dt.Columns.Add("Value");
        for (int i = 2007; i <= 2008; i++)
        {
            for (int j = 1; j <= 12; j++)
            {
                if ((i == 2008) || (j > 10 && i == 2007))
                {
                    DataRow  dr   = dt.NewRow();
                    DateTime date = new DateTime(i, j, 1);
                    dr["Date"]  = string.Format("{0:Y}", date);
                    dr["Value"] = date.Month.ToString() + date.Year.ToString();
                    dt.Rows.Add(dr);
                }
            }
        }

        DDLHelper.BindDDL(ref ddlDate, dt, "Date", "Value", "", "", "");

        ddlDate.SelectedValue = ActivityDate.Month.ToString() + ActivityDate.Year.ToString();
    }
示例#2
0
    private void SelectDrpValues(string ParentSubjectID)
    {
        DataTable dtSubject;

        if (drpRegion.Visible == true)
        {
            drpRegion.SelectedValue = ParentSubjectID;

            dtSubject = BINROTA.BUS.Subjects.GetSubject(int.Parse(ParentSubjectID));//region

            drpCountry.SelectedValue = dtSubject.Rows[0]["ParentSubjectID"].ToString();

            DDLHelper.BindDDL(ref drpRegion, BINROTA.BUS.Subjects.GetSubjectBySubjectID(int.Parse(dtSubject.Rows[0]["ParentSubjectID"].ToString()), (int)Enumerations.SubjectType.Bolge), "Name", "SubjectID", "");

            dtSubject = BINROTA.BUS.Subjects.GetSubject(int.Parse(dtSubject.Rows[0]["ParentSubjectID"].ToString()));//country

            drpContinents.SelectedValue = dtSubject.Rows[0]["ParentSubjectID"].ToString();
            DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpContinents.SelectedValue)), "Name", "SubjectID", "");
        }
        else
        {
            drpCountry.SelectedValue = ParentSubjectID;

            dtSubject = BINROTA.BUS.Subjects.GetSubject(int.Parse(ParentSubjectID));//country

            drpContinents.SelectedValue = dtSubject.Rows[0]["ParentSubjectID"].ToString();
            DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpContinents.SelectedValue)), "Name", "SubjectID", "");
        }
    }
示例#3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("Name");
            dt.Columns.Add("CategoryID");
            DataTable dtCategories = BINROTA.BUS.Categories.GetCategories();
            DataRow   dr           = dt.NewRow();

            dr["Name"]       = "Ana Yazý";
            dr["CategoryID"] = "0";
            dt.Rows.Add(dr);

            foreach (DataRow drCategories in dtCategories.Rows)
            {
                dr               = dt.NewRow();
                dr["Name"]       = drCategories["Name"];
                dr["CategoryID"] = drCategories["CategoryID"];

                dt.Rows.Add(dr);
            }

            DDLHelper.BindDDL(ref drpCategories, dt, "Name", "CategoryID", "");
        }
    }
示例#4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DDLHelper.BindDDL(ref drpCategories, BINROTA.BUS.PageCategories.GetPageCategoriesAll(), "PageCategoryName", "PageCategoryID", "", "Tüm Kategoriler", "0");
     }
 }
示例#5
0
    private void ArrangeDropDowns(int ParentSubjectID, Enumerations.SubjectType SubjectTypeID)
    {
        switch (SubjectTypeID)
        {
        case Enumerations.SubjectType.Kita:
            drpContinents.Visible = false;
            drpCountries.Visible  = false;
            break;

        case Enumerations.SubjectType.Ulke:
            drpContinents.SelectedValue = ParentSubjectID.ToString();
            drpContinents.Visible       = true;
            break;

        case Enumerations.SubjectType.Sehir:
            DataTable dt = BINROTA.BUS.Subjects.GetParentSubjectBySubjectID(ParentSubjectID);
            if (dt.Rows.Count > 0)
            {
                drpContinents.SelectedValue = dt.Rows[0]["SubjectID"].ToString();
            }
            DDLHelper.BindDDL(ref drpCountries, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(Convert.ToInt32(dt.Rows[0]["SubjectID"])), "Name", "SubjectID", "");
            drpCountries.SelectedValue = ParentSubjectID.ToString();
            drpContinents.Visible      = true;
            drpCountries.Visible       = true;
            break;
        }
    }
示例#6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DDLHelper.BindDDL(ref drpContinents, BINROTA.BUS.Subjects.GetSubjectForDDL(1), "Name", "SubjectID", "");
         ModeControl();
     }
 }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DDLHelper.BindDDL(ref drpContinents, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Kita), "Name", "SubjectID", "");
         DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Ulke), "Name", "SubjectID", "");
         ModeControl();
     }
 }
示例#8
0
 private void FillDropDowns()
 {
     DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Ulke), "Name", "SubjectID", "", "Bir Ülke Seçiniz", "0");
     drpCountry.SelectedValue = "4658";
     DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectBySubjectID(int.Parse(drpCountry.SelectedValue), (int)Enumerations.SubjectType.Sehir), "Name", "SubjectID", "", "Bir Þehir Seçiniz", "");
     DDLHelper.BindDDL(ref drpJob, BINROTA.BUS.Jobs.GetJobs(), "Job", "JobID", "", "Bir Meslek Seçiniz", "");
     DDLHelper.LoadNumberDDL(ref drpDay, 31);
     DDLHelper.LoadNumberDDL(ref drpMonth, 12);
     DDLHelper.LoadNumberDDL(ref drpYear, DateTime.Today.Year, 1, 1920);
 }
示例#9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DDLHelper.LoadNumberDDL(ref drpDay, 31, 1, 1);
         DDLHelper.LoadNumberDDL(ref drpMonth, 12, 1, 1);
         DDLHelper.LoadNumberDDL(ref drpYear, 2010, 1, 2000);
         DDLHelper.BindDDL(ref drpPageCategory, BINROTA.BUS.PageCategories.GetPageCategoriesAll(), "PageCategoryName", "PageCategoryID", "");
     }
 }
示例#10
0
    private void BindDDL()
    {
        DataTable dt = BINROTA.BUS.Members.PhotoAlbum.GetAlbums(this.MemberID);

        if (dt.Rows.Count > 0)
        {
            DDLHelper.BindDDL(ref ddlAlbumList, BINROTA.BUS.Members.PhotoAlbum.GetAlbums(this.MemberID), "PhotoName", "MemberPhotoID", "");
            DDLHelper.BindDDL(ref ddlAlbumList2, BINROTA.BUS.Members.PhotoAlbum.GetAlbums(this.MemberID), "PhotoName", "MemberPhotoID", "");
        }
    }
示例#11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DDLHelper.BindDDL(ref drpContinents, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Kita), "Name", "SubjectID", "");
         imgSubjectPhoto.Attributes.Add("onerror", "this.src='Images/NoPictureForSubject.png';");
         UctrlImageUpload1.UploadType = Enumerations.FileUploadType.SubjectImages;
         ((Button)UctrlImageUpload1.FindControl("btnSend")).Visible = false;
         FillSubjectTree();
     }
 }
示例#12
0
    private void FillMemberDetailsForMember(DataTable dt)
    {
        if (dt.Rows.Count > 0)
        {
            txtFirstName.Text       = dt.Rows[0]["FirstName"].ToString();
            hplAllPages.NavigateUrl = "~/PagesView.aspx?MemberID=" + dt.Rows[0]["MemberID"].ToString();
            txtLastName.Text        = dt.Rows[0]["LastName"].ToString();
            DateTime BirthDate = Convert.ToDateTime(dt.Rows[0]["BirthDay"]);
            drpDay.SelectedValue   = BirthDate.Day.ToString();
            drpMonth.SelectedValue = BirthDate.Month.ToString();
            drpYear.SelectedValue  = BirthDate.Year.ToString();

            DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Ulke), "Name", "SubjectID", "");
            DataTable dtLivingPlace = BINROTA.BUS.Subjects.GetParentSubjectBySubjectID(int.Parse(dt.Rows[0]["LivingPlace"].ToString()));
            if (dtLivingPlace.Rows.Count > 0)
            {
                drpCountry.SelectedValue = dtLivingPlace.Rows[0]["SubjectID"].ToString();
                DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectBySubjectID(int.Parse(drpCountry.SelectedValue), (int)Enumerations.SubjectType.Sehir), "Name", "SubjectID", "");
                drpCity.SelectedValue = dt.Rows[0]["LivingPlace"].ToString();
            }

            DDLHelper.BindDDL(ref drpJob, BINROTA.BUS.Jobs.GetJobs(), "Job", "JobID", "");
            drpJob.SelectedValue = dt.Rows[0]["JobID"].ToString();

            txtInterests.Text     = dt.Rows[0]["Interests"].ToString();
            txtVisitedPlaces.Text = dt.Rows[0]["VisitedPlaces"].ToString();
            txtMotto.Text         = dt.Rows[0]["Motto"].ToString();
            lbNickName.Text       = dt.Rows[0]["NickName"].ToString();
            lbEmail.Text          = dt.Rows[0]["Email"].ToString();
            //TODO: Oray && System.IO.File.Exists(Common.ReturnImagePath(dt.Rows[0]["PhotoPath"].ToString(), ConfigurationManager.AppSettings["MemberImagesUrl"].ToString())) eklenecek
            if (dt.Rows[0]["PhotoPath"].ToString() != "")
            {
                imgMemberPortrait.ImageUrl = Common.ReturnImagePath(dt.Rows[0]["PhotoPath"].ToString(), ConfigurationManager.AppSettings["MemberImagesUrl"].ToString());
            }
            else
            {
                imgMemberPortrait.ImageUrl = "~/Images/Design/NoPicture.jpg";
            }


            dt = BINROTA.BUS.Pages.GetUserPages(SessRoot.UserID, (int)Enumerations.PageType.HomePage);
            if (dt.Rows.Count > 0)
            {
                ltrMemberContentPage.Text = dt.Rows[0]["PageContent"].ToString();
            }
        }
        else
        {
            Common.GotoDefaultPage(this.Response);
        }
    }
示例#13
0
 private void BindDDL()
 {
     DDLHelper.BindDDL(ref drpPageCategory, BINROTA.BUS.PageCategories.GetPageCategoriesAll(), "PageCategoryName", "PageCategoryID", "");
     DDLHelper.BindDDL(ref drpContinent, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(0), "Name", "SubjectID", "");
     if (this.SubjectID != 0)
     {
         BindDLLBySubjectID(this.SubjectID);
     }
     else
     {
         DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpContinent.SelectedValue)), "Name", "SubjectID", "");
         DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpCountry.SelectedValue)), "Name", "SubjectID", "", "Ülke Genel", "0");
     }
 }
示例#14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             FillSubjectTree();
             DDLHelper.BindDDL(ref drpCategories, BINROTA.BUS.Categories.GetCategories(), "Name", "CategoryID", "");
         }
         catch (Exception)
         {
             throw;
         }
     }
 }
示例#15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (SessRoot == null)
        {
            Common.GotoDefaultPage(this.Response);
        }
        if (SessRoot.LoginType == (int)Enumerations.LoginType.Member)
        {
            Common.GotoDefaultPage(this.Response);
        }
        if (!IsPostBack)
        {
            DDLHelper.BindDDL(ref drpContinents, BINROTA.BUS.Subjects.GetSubjectForDDL(1), "Name", "SubjectID", "");
            ModeControl();

            btnDelete.Attributes.Add("onclick", "return confirm('Kaydý silmek istediðinizden emin misiniz ?');");
            UctrlImageUpload1.UploadType = Enumerations.FileUploadType.SubjectImages;
        }
    }
示例#16
0
    protected void drpCountry_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable dt = BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpCountry.SelectedValue));

        if (dt.Rows.Count > 0)
        {
            if (int.Parse(dt.Rows[0]["SubjectTypeID"].ToString()) == (int)Enumerations.SubjectType.Bolge)
            {
                DDLHelper.BindDDL(ref drpRegion, dt, "Name", "SubjectID", "");
                SubjectID = int.Parse(drpRegion.SelectedValue);
            }
            else
            {
                SubjectID = int.Parse(drpCountry.SelectedValue);
            }

            FillRegions();
        }
    }
示例#17
0
    private void BindDDL()
    {
        DataTable dt = new DataTable();

        dt.Columns.Add("Date");
        dt.Columns.Add("Value");
        for (int i = 2007; i <= DateTime.Today.Year; i++)
        {
            for (int j = 1; j <= DateTime.Today.Month; j++)
            {
                DataRow  dr   = dt.NewRow();
                DateTime date = new DateTime(i, j, 1);
                dr["Date"]  = string.Format("{0:Y}", date);
                dr["Value"] = date.Month.ToString() + date.Year.ToString();
                dt.Rows.Add(dr);
            }
        }
        DDLHelper.BindDDL(ref drpActivityDate, dt, "Date", "Value", "", "Tarih Seçiniz", "0");
    }
示例#18
0
    private void FillForm()
    {
        DDLHelper.BindDDL(ref drpPageCategory, BINROTA.BUS.PageCategories.GetPageCategoriesAll(), "PageCategoryName", "PageCategoryID", "");
        DDLHelper.BindDDL(ref drpContinent, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(0), "Name", "SubjectID", "");
        DataTable dt = BINROTA.BUS.Pages.GetPageForExistanceControl(PageID);

        if (dt.Rows.Count > 0)
        {
            if (SessRoot.UserID == Convert.ToInt32(dt.Rows[0]["MemberID"]))
            {
                ftbPageContent.Text = dt.Rows[0]["PageContent"].ToString();
                txtTitle.Text       = dt.Rows[0]["Title"].ToString();
                DateTime travelDate = Convert.ToDateTime(dt.Rows[0]["TravelDate"]);
                drpDay.SelectedValue          = travelDate.Day.ToString();
                drpMonth.SelectedValue        = travelDate.Month.ToString();
                drpYear.SelectedValue         = travelDate.Year.ToString();
                drpPageCategory.SelectedValue = dt.Rows[0]["PageCategoryID"].ToString();

                BindDLLBySubjectID(int.Parse(dt.Rows[0]["SubjectID"].ToString()));
            }
            else
            {
                Response.Write("<script language='javascript'> { window.close();}</script>");
                Response.End();
            }
        }
        else
        {
            Response.Write("<script language='javascript'> { window.close();}</script>");
            Response.End();
        }

        DataTable dtCategories = BINROTA.BUS.Categories.GetCategories();

        foreach (DataRow dr in dtCategories.Rows)
        {
            dt = BINROTA.BUS.Pages.GetPageForExistanceControl(PageID, int.Parse(dr["CategoryID"].ToString()));
            foreach (DataRow dr1 in dt.Rows)
            {
                UctrlPageCategories1.SetCategoryContent(int.Parse(dr1["CategoryID"].ToString()), dr1["PageContent"].ToString());
            }
        }
    }
示例#19
0
    private void FillSubjects()
    {
        if ((Request.QueryString["SubjectID"] != null) && (CARETTA.COM.Util.IsNumeric(Request.QueryString["SubjectID"])))
        {
        }
        else
        {
            Common.GotoDefaultPage(this.Response);
        }
        DDLHelper.BindDDL(ref drpContinents, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Kita), "Name", "SubjectID", "");
        DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectForDDL((int)Enumerations.SubjectType.Ulke), "Name", "SubjectID", "");
        DataTable dt = BINROTA.BUS.Subjects.GetParentSubjectBySubjectID(int.Parse(Request.QueryString["SubjectID"]));

        if (dt.Rows.Count > 0)
        {
            drpContinents.SelectedValue = dt.Rows[0]["SubjectID"].ToString();
            drpCountry.SelectedValue    = Request.QueryString["SubjectID"];
        }
    }
示例#20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataTable dt = null;
            if (Request.QueryString["SearchText"] != null)
            {
                if (Util.IsNumeric(Request.QueryString["SubjectID"]) && Util.IsNumeric(Request.QueryString["PageCategoryID"]))
                {
                    this.SearchText     = Request.QueryString["SearchText"];
                    this.SubjectID      = int.Parse(Request.QueryString["SubjectID"]);
                    this.PageCategoryID = int.Parse(Request.QueryString["PageCategoryID"]);
                    dt = BINROTA.BUS.Pages.PageSearch(this.SearchText, this.PageCategoryID, this.SubjectID);
                }
                else
                {
                    this.SearchText = Request.QueryString["SearchText"];
                    dt = BINROTA.BUS.Pages.PageSearchForSubject(this.SearchText);
                }
            }
            else if (Util.IsNumeric(Request.QueryString["PageCategoryID"]))
            {
                this.PageCategoryID = int.Parse(Request.QueryString["PageCategoryID"]);
                dt = BINROTA.BUS.Pages.PageSearch("", this.PageCategoryID);
            }
            else if (Util.IsNumeric(Request.QueryString["SubjectID"]))
            {
                this.SubjectID      = int.Parse(Request.QueryString["SubjectID"]);
                this.SearchText     = "";
                this.PageCategoryID = 0;
                dt = BINROTA.BUS.Pages.PageSearch(this.SearchText, this.PageCategoryID, this.SubjectID);
            }
            else
            {
                BINROTA.COM.Common.GotoDefaultPage(this.Response);
            }

            txtSearch.Text = this.SearchText;
            FillSearchResults(dt);
            DDLHelper.BindDDL(ref drpCategories, BINROTA.BUS.PageCategories.GetPageCategoriesAll(), "PageCategoryName", "PageCategoryID", "", "Bir Kategori Seçiniz", "0");
        }
    }
示例#21
0
    private void BindDLLBySubjectID(int SubjectID)
    {
        DataTable dt = BINROTA.BUS.Subjects.GetSubject(SubjectID);

        try
        {
            if (dt.Rows.Count > 0)
            {
                if (int.Parse(dt.Rows[0]["SubjectTypeID"].ToString()) == (int)Enumerations.SubjectType.Ulke)
                {
                    drpContinent.SelectedValue = dt.Rows[0]["ParentSubjectID"].ToString();
                    DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpContinent.SelectedValue)), "Name", "SubjectID", "");
                    drpCountry.SelectedValue = dt.Rows[0]["SubjectID"].ToString();
                    DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpCountry.SelectedValue)), "Name", "SubjectID", "", "Ülke Genel", "0");
                }
                else
                if (int.Parse(dt.Rows[0]["SubjectTypeID"].ToString()) == (int)Enumerations.SubjectType.Sehir)
                {
                    int       subjectID = int.Parse(dt.Rows[0]["SubjectID"].ToString());
                    DataTable dtCountry = BINROTA.BUS.Subjects.GetSubject(int.Parse(dt.Rows[0]["ParentSubjectID"].ToString()));
                    drpContinent.SelectedValue = dtCountry.Rows[0]["ParentSubjectID"].ToString();
                    DDLHelper.BindDDL(ref drpCountry, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpContinent.SelectedValue)), "Name", "SubjectID", "");
                    drpCountry.SelectedValue = dt.Rows[0]["ParentSubjectID"].ToString();
                    DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpCountry.SelectedValue)), "Name", "SubjectID", "", "Ülke Genel", "0");
                    drpCity.SelectedValue = subjectID.ToString();
                }
            }
            else
            {
                Response.Write("<script language='javascript'> { window.close();}</script>");
                Response.End();
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
示例#22
0
 protected void drpCountry_SelectedIndexChanged(object sender, EventArgs e)
 {
     DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectBySubjectID(int.Parse(drpCountry.SelectedValue), (int)Enumerations.SubjectType.Sehir), "Name", "SubjectID", "");
 }
示例#23
0
 protected void drpCountry_SelectedIndexChanged(object sender, EventArgs e)
 {
     DDLHelper.BindDDL(ref drpCity, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpCountry.SelectedValue)), "Name", "SubjectID", "", "Ülke Genel", "0");
 }
示例#24
0
 protected void drpContinents_SelectedIndexChanged(object sender, EventArgs e)
 {
     DDLHelper.BindDDL(ref drpCountries, BINROTA.BUS.Subjects.GetSubjectByParentSubjectID(int.Parse(drpContinents.SelectedValue)), "Name", "SubjectID", "");
 }