Пример #1
0
        protected void btn_Add_WebMedia_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                ProductMgr myProductMgr = new ProductMgr();

                string WebMediaID = Nexus.Core.Tools.IDGenerator.Get_New_GUID_PlainText();

                e2Data[] UpdateData =
                {
                    new e2Data("WebMediaID",        WebMediaID),
                    new e2Data("ProductID",         _productid),
                    new e2Data("Media_Type",        droplist_Media_Type.SelectedValue),
                    new e2Data("Media_Title",       tbx_Media_Title.Text),
                    new e2Data("Media_Value",       tbx_ImageURL.Text),
                    new e2Data("Media_Description", tbx_Description.Text),
                    new e2Data("SortOrder",         "0")
                };

                myProductMgr.Add_WebMedia(UpdateData);

                Control_Init();

                MultiView_WebMediaForm.SetActiveView(View_Button);
            }
        }
Пример #2
0
        protected void btn_Show_AddForm_Click(object sender, EventArgs e)
        {
            // Reset Form
            Control_FillData();

            // Reset Buttons
            btn_Add_WebMedia.Visible    = true;
            btn_Update_WebMedia.Visible = false;
            btn_Cancel.Visible          = true;

            MultiView_WebMediaForm.SetActiveView(View_Form);
        }
Пример #3
0
        protected void lbtn_Edit_Media_Command(object sender, CommandEventArgs e)
        {
            if (!DataEval.IsEmptyQuery(e.CommandArgument.ToString()))
            {
                ProductMgr myProductMgr = new ProductMgr();

                WebMedia myWebMedia = myProductMgr.Get_WebMedium(e.CommandArgument.ToString());

                droplist_Media_Type.SelectedValue = StringEnum.GetStringValue(myWebMedia.Media_Type);
                tbx_Media_Title.Text = myWebMedia.Media_Title;
                tbx_ImageURL.Text    = myWebMedia.Media_Value;
                tbx_Description.Text = myWebMedia.Media_Description;

                btn_Add_WebMedia.Visible            = false;
                btn_Update_WebMedia.Visible         = true;
                btn_Update_WebMedia.CommandArgument = myWebMedia.WebMediaID;
                btn_Cancel.Visible = true;

                MultiView_WebMediaForm.SetActiveView(View_Form);
            }
        }
Пример #4
0
        protected void btn_Update_WebMedia_Command(object sender, CommandEventArgs e)
        {
            if (Page.IsValid && !DataEval.IsEmptyQuery(e.CommandArgument.ToString()))
            {
                ProductMgr myProductMgr = new ProductMgr();

                e2Data[] UpdateData =
                {
                    new e2Data("WebMediaID",        e.CommandArgument.ToString()),
                    new e2Data("Media_Type",        droplist_Media_Type.SelectedValue),
                    new e2Data("Media_Title",       tbx_Media_Title.Text),
                    new e2Data("Media_Value",       tbx_ImageURL.Text),
                    new e2Data("Media_Description", tbx_Description.Text)
                };

                myProductMgr.Edit_WebMedia(UpdateData);

                Control_Init();

                MultiView_WebMediaForm.SetActiveView(View_Button);
            }
        }
Пример #5
0
 protected void btn_Cancel_Click(object sender, EventArgs e)
 {
     MultiView_WebMediaForm.SetActiveView(View_Button);
 }
Пример #6
0
        private void Control_Init()
        {
            RadGrid_WebMedia.Rebind();

            MultiView_WebMediaForm.SetActiveView(View_Button);
        }