//protected void CustomValidator_Category_ServerValidate(object source, ServerValidateEventArgs args) //{ // if (DataEval.IsEmptyQuery(CategoryTree_Menu.Selected_CategoryID)) // args.IsValid = false; //} protected void btn_Update_Click(object sender, EventArgs e) { if (Page.IsValid) { Lib.EbayMgr myEbayMgr = new Lib.EbayMgr(); e2Data[] UpdateData = { new e2Data("Ebay_ItemID", _itemid), //new e2Data("CategoryID", CategoryTree_Menu.Selected_CategoryID), new e2Data("Item_Description", TextEditor_ItemContent.Content), new e2Data("IsActive", rbtn_IsActive.SelectedValue) }; myEbayMgr.Edit_Ebay_Item(UpdateData); // Switch Category //CategoryMgr myCategoryMgr = new CategoryMgr(); //myCategoryMgr.Move_ComponentInCategory_Item(_source_categoryid, CategoryTree_Menu.Selected_CategoryID, "707AF36D-CDFC-44EF-81B1-4D5FEFDDAEE6"); // Finish Update Close Window string _finishupdate_script = string.Format("CloseAndRebind({0});", DataEval.QuoteText("Module_ControlPanel")); ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "myScript", _finishupdate_script, true); } }
protected void btn_IsActive_Click(object sender, EventArgs e) { if (Page.IsValid) { for (int i = 0; i < ListView_ItemList.Items.Count; i++) { CheckBox chk_Selected = (CheckBox)ListView_ItemList.Items[i].FindControl("chk_Selected"); if (chk_Selected.Checked) { HiddenField hidden_ItemID = (HiddenField)ListView_ItemList.Items[i].FindControl("Hidden_ItemID"); Lib.EbayMgr myEbayMgr = new Lib.EbayMgr(); Lib.Ebay_Item myEbay_Item = myEbayMgr.Get_Ebay_Item(hidden_ItemID.Value); e2Data[] UpdateData = { new e2Data("Ebay_ItemID", myEbay_Item.Ebay_ItemID), new e2Data("IsActive", rbtn_IsActive.SelectedValue) }; myEbayMgr.Edit_Ebay_Item(UpdateData); } } Control_Init(); } }
private void Control_PreInit() { if (!DataEval.IsEmptyQuery(Request["NexusEbayItemID"])) { // Add View Count Lib.EbayMgr myEbayMgr = new Lib.EbayMgr(); Lib.Ebay_Item myEbay_Item = myEbayMgr.Get_Ebay_Item(Request["NexusEbayItemID"]); int _view_count = Convert.ToInt32(myEbay_Item.View_Count) + 1; e2Data[] UpdateData_Item = { new e2Data("Ebay_ItemID", myEbay_Item.Ebay_ItemID), new e2Data("View_Count", _view_count.ToString()) }; myEbayMgr.Edit_Ebay_Item(UpdateData_Item); } }