Exemplo n.º 1
0
        void btnAddNewProgram_Click(object sender, EventArgs e)
        {
            btnAddNewProgram.Visible = false;
            pnlEditProgram.Visible   = true;
            pnlProgramLists.Visible  = false;

            ProgramEdit1.Clear();
        }
Exemplo n.º 2
0
        protected void ProgramEdit1_ControlCancelled(object sender)
        {
            btnAddNewProgram.Visible = true;
            pnlEditProgram.Visible   = false;
            pnlProgramLists.Visible  = true;

            ProgramEdit1.Clear();
        }
Exemplo n.º 3
0
        protected void ProgramEdit1_ControlSaved(object sender, ControlSavedEventArgs e)
        {
            lblFeedback.Text         = "Item saved: " + DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");
            btnAddNewProgram.Visible = true;
            pnlEditProgram.Visible   = false;
            pnlProgramLists.Visible  = true;

            ProgramEdit1.Clear();

            BindBothLists();
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int ProgramID = 0;

            if (Request.QueryString.AllKeys.Contains("ProgramID"))
            {
                ProgramID = int.Parse(Request.QueryString["ProgramID"]);
            }
            if (ProgramID != 0 && ProgramEdit1.PrimaryKeyIndex == 0)
            {
                ProgramEdit1.PrimaryKeyIndex = ProgramID;
                ProgramEdit1.Bind();

                btnAddNewProgram.Visible = false;
                pnlEditProgram.Visible   = true;
                pnlProgramLists.Visible  = false;
            }
            else if (!IsPostBack)
            {
                //BindBothLists();
            }
        }