コード例 #1
0
    protected void Update_Click(object sender, EventArgs e)
    {
        TextBox         name        = (TextBox)DetailsView_degreeplan.FindControl("name");
        DropDownList    country     = (DropDownList)DetailsView_degreeplan.FindControl("Countrydp");
        DropDownList    confirmed   = (DropDownList)DetailsView_degreeplan.FindControl("confirmed");
        DropDownList    type        = (DropDownList)DetailsView_degreeplan.FindControl("type");
        DropDownList    equivalency = (DropDownList)DetailsView_degreeplan.FindControl("equivalency");
        CKEditorControl des         = (CKEditorControl)DetailsView_degreeplan.FindControl("destxt");
        bool            result      = false;

        switch (Session["Admin_Type"].ToString())
        {
        case "USER":
            result = ClientAdmin.Utility.Grid_DegreePlanUpdate(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), type.SelectedValue.ToString(), Convert.ToInt32(Session["degree_id"].ToString()), Convert.ToInt32(equivalency.SelectedValue.ToString()), Session["Admin_Customer"].ToString(), des.Text, Session["degree_role"].ToString());
            break;

        case "ADMIN":
            result = MasterAdmin.Utility.Grid_DegreePlanUpdate(name.Text, Convert.ToInt32(country.SelectedValue.ToString()), Convert.ToInt32(confirmed.SelectedValue.ToString()), type.SelectedValue.ToString(), Convert.ToInt32(Session["degree_id"].ToString()), Convert.ToInt32(equivalency.SelectedValue.ToString()), Session["Admin_Customer"].ToString(), des.Text, Session["degree_role"].ToString());
            break;

        default:
            Response.Redirect("~/Fail.aspx");
            break;
        }

        if (result == true)
        {
            Response.Redirect("~/secure/EducationProgram/Browse_DegreePlan.aspx?search=" + Request.QueryString["search"].ToString() + "&t1=" + Request.QueryString["t1"].ToString() + "&t2=" + Request.QueryString["t2"].ToString());
        }
    }
コード例 #2
0
    protected void Swap_Click(object sender, EventArgs e)
    {
        CKEditorControl    countrydes = (CKEditorControl)DetailsView_degreeplan.FindControl("destxt");
        HtmlGenericControl masterdesc = (HtmlGenericControl)DetailsView_degreeplan.FindControl("masterdesc");

        countrydes.Text = masterdesc.InnerHtml;
    }
コード例 #3
0
    protected void DetailsView_degreeplan_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            switch (Session["Admin_Type"].ToString())
            {
            case "USER":
                ClientAdmin.Utility.Grid_DegreePlanSelect(DetailsView_degreeplan, Convert.ToInt32(Session["degree_id"].ToString()), Session["Admin_Customer"].ToString(), Session["degree_role"].ToString());
                break;

            case "ADMIN":
                MasterAdmin.Utility.Grid_DegreePlanSelect(DetailsView_degreeplan, Convert.ToInt32(Session["degree_id"].ToString()), Session["degree_role"].ToString());
                HtmlGenericControl tab = (HtmlGenericControl)DetailsView_degreeplan.FindControl("extratab");
                tab.Visible = false;
                break;

            default:
                Response.Redirect("~/Fail.aspx");
                break;
            }

            DropDownList country = (DropDownList)DetailsView_degreeplan.FindControl("Countrydp");
            Label        temp    = (Label)DetailsView_degreeplan.FindControl("temp");
            country.SelectedValue = temp.Text;
            DropDownList dp    = (DropDownList)DetailsView_degreeplan.FindControl("equivalency");
            Label        temp1 = (Label)DetailsView_degreeplan.FindControl("temp1");
            dp.SelectedValue = temp1.Text;
        }
    }
コード例 #4
0
    protected void Countrydp_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            DropDownList countrydp = (DropDownList)DetailsView_degreeplan.FindControl("Countrydp");
            switch (Session["Admin_Type"].ToString())
            {
            case "USER":
                ClientAdmin.Utility.Getcountry(countrydp, Session["Admin_Customer"].ToString());
                break;

            case "ADMIN":
                MasterAdmin.Utility.Getcountry(countrydp, Session["Customer_id"].ToString());
                break;

            default:
                Response.Redirect("~/Fail.aspx");
                break;
            }
        }
    }
コード例 #5
0
    protected void equivalency_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            RossSoft.Utility.AppConfig app = RossSoft.Utility.AppSettings();
            DropDownList dp = (DropDownList)DetailsView_degreeplan.FindControl("equivalency");
            switch (Session["Admin_Type"].ToString())
            {
            case "USER":
                ClientAdmin.Utility.GetEquivalency(dp, Session["Admin_Customer"].ToString(), app.AdminId, false);
                break;

            case "ADMIN":
                MasterAdmin.Utility.GetEquivalency(dp, Session["Customer_id"].ToString(), Session["Admin_Customer"].ToString());
                break;

            default:
                Response.Redirect("~/Fail.aspx");
                break;
            }
        }
    }