示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int tourID = PageTools.GetSavedId("tourID", Request.QueryString["id"]);
            if (tourID > 0 && Request.QueryString["id"] == null)
                Response.Redirect("TourDestinations.aspx?id=" + tourID.ToString());

            AdminTourBiz biz = new AdminTourBiz();
            DS_Tours.tourDetailDataTable dt = biz.GetTourDetail(tourID);

            if (tourID > 0 && dt.Rows.Count > 0)
            {
                DS_Tours.tourDetailRow row = dt.Rows[0] as DS_Tours.tourDetailRow;
                lbTourName.Text = "#" + row.TourID.ToString() + ":" + row.TourName + " / " + row.TourName_cn;
            }
            fvTourDayDest.ChangeMode(FormViewMode.Insert);
        }
    }
示例#2
0
    private void LoadWeekly(int tourID)
    {
        if (tourID>0)
        {
            AdminTourBiz biz = new AdminTourBiz();
            string weekly = biz.GetWeekly(tourID);

            chkAutoCreate.Checked = (weekly[0] == 'Y');
            chkMonday.Checked = (weekly.IndexOf('1') >= 0);
            chkTuesday.Checked = (weekly.IndexOf('2') >= 0);
            chkWednesday.Checked = (weekly.IndexOf('3') >= 0);
            chkThursday.Checked = (weekly.IndexOf('4') >= 0);
            chkFriday.Checked = (weekly.IndexOf('5') >= 0);
            chkSaturday.Checked = (weekly.IndexOf('6') >= 0);
            chkSunday.Checked = (weekly.IndexOf('0') >= 0);

            DS_Tours.tourDetailDataTable dt = biz.GetTourDetail(tourID);
            if (dt.Rows.Count > 0)
            {
                DS_Tours.tourDetailRow row = dt.Rows[0] as DS_Tours.tourDetailRow;
                lbTourName.Text = "#" + row.TourID.ToString() + ":" + row.TourName + " / " + row.TourName_cn;
            }
        }
    }