protected void DetailsViewCustomer_ModeChanging(object sender, DetailsViewModeEventArgs e) { try { this.isSwitchingViewMode = true; this.DetailsViewCustomer.ChangeMode(e.NewMode); if (e.CancelingEdit) { this.getData(this.customerID); this.addCustomerDataToCache(); } this.bindData(); } catch (Exception ex) { //TracingUtility.Trace(new object[] { ex.ToString() }, TracingUtility.DefaultTraceSourceName); Provider.Tracer().Trace(new object[] { ex.ToString() }, null); throw; } }
//need this to enter edit mode (p-494) may be to safe guard data. Note tht it's "-ing" method //DetailsView does NOT auto switch to EDIT mode for some reason//this method maked EDIT & CANCEL btn work but UPDATE needs it's own handler protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { /*e.NewMode tells app that user requested to enter into a mode other than *'ReadOnly' mode e.g. into an EDIT mode. App should explicitly allow to enter edit mode*/ DetailsView1.ChangeMode(e.NewMode); BindDetails(); }
protected void DetailsView1_ModeChaning(object sender, DetailsViewModeEventArgs e) { if (Label5.Text == "已关闭") return; this.DetailsView1.ChangeMode(e.NewMode); bind(); }
protected void PostView_ModeChanging(object sender, DetailsViewModeEventArgs e) { switch (e.NewMode) { case DetailsViewMode.Edit: postView.ChangeMode(DetailsViewMode.Edit); break; case DetailsViewMode.Insert: postView.ChangeMode(DetailsViewMode.Insert); break; default: postView.ChangeMode(DetailsViewMode.ReadOnly); break; } if (postView.SelectedValue != null) { Load_Forms(Convert.ToInt32(postView.SelectedValue)); } else { Load_Forms(-1); } }
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit || e.Cancel) { Response.Redirect("~/EditarePrelevatori.aspx"); } }
protected void dvCurrencyConversion_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit == true) { dvCurrencyConversion.Visible = false; } }
protected void DVAddNewCustomer_ModeChanging(object sender, DetailsViewModeEventArgs e) { DVAddNewCustomer.Visible = false; Response.Write("<script>alert('הפעולה בוטלה !!')</script>"); //GVCustomers.Visible = true; //GVCustomers.DataBind(); }
protected void DVAddDeliver2Bike_ModeChanging(object sender, DetailsViewModeEventArgs e) { DVAddDeliver2Bike.Visible = false; GVDeliverBikeList.Visible = true; GVDeliverBikeList.DataBind(); Response.Write("<script>alert('הפעולה בוטלה !!')</script>"); }
protected void DetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { #region ModeChanging Action DetailsView dv = (DetailsView)sender; dv.ChangeMode(e.NewMode); try { Int32 donationid = Convert.ToInt32(GridView1.SelectedDataKey.Values[0].ToString()); Int32 donorid = Convert.ToInt32(GridView1.SelectedDataKey.Values[1].ToString()); DetailsView_Data(donationid, donorid, dv); } catch (Exception ex) { Error_Save(ex, "DetailsView_ModeChanging"); } if (e.NewMode == DetailsViewMode.Edit) { dv.AllowPaging = false; } else { dv.AllowPaging = true; } #endregion ModeChanging Action }
protected void OnDetailsViewModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.NewMode != DetailsViewMode.ReadOnly) { GridView1.EditIndex = -1; } }
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("~/Web/Admin/BookManager.aspx"); } }
protected void dt12_ModeChanging(object sender, DetailsViewModeEventArgs e) { dt12.ChangeMode(e.NewMode); SqlCommand cd; SqlDataAdapter da; DataTable dt; cd = new SqlCommand("getProfileDetails", con); cd.CommandType = CommandType.StoredProcedure; cd.Parameters.AddWithValue("@Empemail", Session["email"].ToString()); dt = new DataTable(); da = new SqlDataAdapter(cd); da.Fill(dt); //int eid = 0; //foreach (DataRow item in dt.Rows) //{ // eid = Convert.ToInt16(item[0]); // EmpName.Text = item[1].ToString(); // Email.Text = item[2].ToString(); // Contact.Text = item[3].ToString(); // Gender.Text = item[4].ToString(); // Specialization.Text = item[5].ToString(); // Position.Text = item[6].ToString(); // pimg.ImageUrl = item[7].ToString(); // EmpCountry.Text = item[8].ToString(); // State.Text = item[9].ToString(); // City.Text = item[10].ToString(); //} dt12.DataSource = dt; dt12.DataBind(); }
protected void employeeDetails_ModeChanging(object sender, DetailsViewModeEventArgs e) { // Change current mode to the selected one employeeDetails.ChangeMode(e.NewMode); // Rebind the grid BindDetails(); }
protected void DetailsViews1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("~/Views/Product/Manage.aspx"); } }
protected void dvOpportunity_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("CRMSalesPipeLine.aspx"); } }
protected void AddCustomerDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("CustomerAdd.aspx"); } }
protected void dvEmps_ModeChanging(object sender, DetailsViewModeEventArgs e) { //依不同模式顯示Headertext及背景色 switch (e.NewMode) { case DetailsViewMode.Edit: dvEmp.HeaderText = "編輯員工基本資料"; dvEmp.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; dvEmp.HeaderStyle.BackColor = Color.Red; //若為編輯模式,則改變其背景色及各個Fields設定其寬度為100 dvEmp.EditRowStyle.BackColor = Color.LightPink; for (int i = 0; i < dvEmp.Fields.Count - 1; i++) { dvEmp.Fields[i].ControlStyle.Width = 150; } break; case DetailsViewMode.Insert: dvEmp.HeaderText = "新增員工基本資料"; dvEmp.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; dvEmp.HeaderStyle.BackColor = Color.DeepSkyBlue; //若為新增模式,則改變其背景色及各個Fields設定其寬度為100 dvEmp.InsertRowStyle.BackColor = Color.LightCyan; for (int i = 0; i < dvEmp.Fields.Count - 1; i++) { dvEmp.Fields[i].ControlStyle.Width = 150; dvEmp.Fields[i].ControlStyle.Height = 35; } break; default: dvEmp.HeaderStyle.BackColor = Color.Tan; break; } }
protected void Dvw_PersonalDetails_ModeChanging(object sender, DetailsViewModeEventArgs e) { try { if (Dvw_PersonalDetails.CurrentMode == DetailsViewMode.Edit) { Dvw_PersonalDetails.ChangeMode(DetailsViewMode.ReadOnly); } else { Dvw_PersonalDetails.ChangeMode(DetailsViewMode.Edit); } Student Student = new Student(); Student_BLogic BAL_Student = new Student_BLogic(); Student.studentid = AppSessions.StudentID; DataSet dsSelect = new DataSet(); dsSelect = BAL_Student.BAL_Student_Select(Student, "SelectByID"); Dvw_PersonalDetails.DataSource = dsSelect; Dvw_PersonalDetails.DataBind(); ViewState["byteimage"] = (byte[])dsSelect.Tables[0].Rows[0]["Picture"]; } catch (Exception ex) { } }
protected void friendDetailsGrid_ModeChanging(object sender, DetailsViewModeEventArgs e) { System.Diagnostics.Debug.WriteLine("*****INSIDE FRIENDDETAILS:friendDetailsGrid_ModeChanging*****"); friendDetailsGrid.ChangeMode(e.NewMode); BindDetails(); }
protected void vehicleServiceDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit == true) { Response.Redirect("Vehicles.aspx"); } }
protected void MovieDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("~/Default.aspx"); } }
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("DBTest.aspx"); } }
protected void recipeGrid_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit == true) { recipeGrid.ChangeMode(DetailsViewMode.ReadOnly); recipeGrid.DataBind(); } else { recipeGrid.ChangeMode(DetailsViewMode.Edit); //List<ListItem> categoryList = _objrepositry.getCategory(); //List<ListItem> withSelected = new List<ListItem>(); //foreach (ListItem category in categoryList) //{ // if (category.Text == selecteditem) // { // withSelected.Add(new ListItem { Text = category.Text, Value = category.Value, Selected = true }); // } // else // { // withSelected.Add(new ListItem { Text = category.Text, Value = category.Value }); // } //} //withSelected.Add(new ListItem { Text = "Others", Value = withSelected.Count.ToString() }); //((DropDownList)recipeGrid.Rows[2].Cells[1].FindControl("DropDownList1")).DataSource = withSelected; recipeGrid.DataBind(); } }
protected void SuperForm1_ModeChaning(object sender, DetailsViewModeEventArgs e) { if (e.NewMode == DetailsViewMode.ReadOnly) { SuperForm1.DataBind(); } e.Cancel = true; }
protected void insertPhoneDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { insertPhoneDetailsView.Rows[0].Cells[1].Text = null; insertPhoneDetailsView.Rows[1].Cells[1].Text = null; } }
protected void vehicleDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { // Button Cancel Click in DetailsView Response.Redirect("Vehicles.aspx"); } }
protected void DVAddBike_ModeChanging(object sender, DetailsViewModeEventArgs e) { DVAddBike.Visible = false; GVAllBikes.Visible = true; ltEmbedHT.Visible = false; Response.Write("<script>alert('הפעולה בוטלה !!')</script>"); GVAllBikes.DataBind(); }
protected void DetailsView2_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { GridView1.DataSourceID = "SqlDataSource1"; GridView1.DataBind(); } }
protected void CustomerDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { CustomerDetailsView.ChangeMode(e.NewMode); if (e.NewMode != DetailsViewMode.Insert) { BindCustomer(); } }
protected void dvCreateCourse_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.NewMode == DetailsViewMode.ReadOnly) { dvCreateCourse.Visible = false; btnCreateCourse.Enabled = true; } }
protected void StockDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (!WebTools.UserInRole("MM_UPDATE") && e.NewMode == DetailsViewMode.Edit) { Master.ShowWarn("Access Denied - Error 403."); e.Cancel = true; } }
protected void DVPersionalDetail_ModeChanging(object sender, DetailsViewModeEventArgs e) { DVPersionalDetail.ChangeMode(e.NewMode); LoadPersionalDetail(); }
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (DetailsView1.CurrentMode == DetailsViewMode.Insert) { DetailsView1.Visible = false; GridView1.Visible = true; } }
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (!IsEditEnabled() && e.NewMode == DetailsViewMode.Edit) { e.Cancel = true; lblMessage.Text = "Sorry, your user account does not have permission to edit the data."; } }
protected void PersonalDetailsView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.NewMode == DetailsViewMode.Edit) PersonalDetailsView.ChangeMode(DetailsViewMode.Edit); if (e.NewMode == DetailsViewMode.ReadOnly) PersonalDetailsView.ChangeMode(DetailsViewMode.ReadOnly); PersonalDetailsView.DataSource = ViewState["DataTable"]; PersonalDetailsView.DataBind(); }
protected void ControlView_ModeChanging(object sender, DetailsViewModeEventArgs e) { ControlView.DataSource = null; ControlView.DataBind(); }
protected void dtv_plan1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.NewMode == DetailsViewMode.Edit) { if (e.CancelingEdit == true) { //window.close(); string scrpt = "window.close();"; Page.ClientScript.RegisterStartupScript(this.GetType(), "close", scrpt, true); } } }
protected void CustomerView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { try { List<ListCustomers_Result> data = Brentwood.ListCustomers(); Guid userid = Guid.Parse(CustomerView.DataKey.Value.ToString()); int itemIndex = data.FindIndex(item => item.UserId == userid); CustomerView.PageIndex = itemIndex; CustomerView.DataSource = data; CustomerView.DataBind(); } catch (Exception ex) { FormMessage.ForeColor = Color.Red; FormMessage.Text = ex.Message; } } }
protected void NotAssignedVacDV_ModeChanging(object sender, DetailsViewModeEventArgs e) { NotAssignedVacDV.ChangeMode(e.NewMode); BindAssignedVacToDetailView(); }
protected void dvFollowupItem_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { //Clear entered Items in the Details View //For FollowUpDate TextBox FollowUpDateCal = new TextBox(); FollowUpDateCal = (TextBox)dvFollowupItem.FindControl("FollowUpDate"); if ((FollowUpDateCal != null)) { FollowUpDateCal.Text = ""; } //For Description TextBox Descriptiontxt = new TextBox(); Descriptiontxt = (TextBox)dvFollowupItem.FindControl("txtDescription"); if ((Descriptiontxt != null)) { Descriptiontxt.Text = ""; } //For Topic TextBox Topictxt = new TextBox(); Topictxt = (TextBox)dvFollowupItem.FindControl("txtTopic"); if ((Topictxt != null)) { Topictxt.Text = ""; } //For Phone TextBox Phonetxt = new TextBox(); Phonetxt = (TextBox)dvFollowupItem.FindControl("txtPhone"); if ((Phonetxt != null)) { Phonetxt.Text = ""; } } }
//************************************************************************************* Edit mode video details grid ********************** protected void videoDetail_ModeChanging(object sender, DetailsViewModeEventArgs e) { { if (!e.CancelingEdit) { videoDetail.ChangeMode(e.NewMode); Session["videoEdit"] = "true"; h3Title.Text = "Edit Video Information"; BindVideoDetails(); int selectRowIndex = videoInfoGrid.SelectedIndex; int videoInfoID = (int)videoInfoGrid.DataKeys[selectRowIndex].Value; SqlConnection conn; SqlCommand comm; SqlCommand ddlAuthComm; SqlCommand cbEdComm; SqlCommand cbEdCKComm; SqlCommand ddlCatComm; SqlCommand impStepsComm; SqlCommand impStepsCKComm; SqlDataReader reader; string connectionString = ConfigurationManager.ConnectionStrings["leoQuickStart"].ConnectionString; conn = new SqlConnection(connectionString); comm = new SqlCommand("SELECT videoInfo.videoInfoID, [videoInfo].videoName, videoAuthor.videoAuthID, videoAuthor.authorName, videoInfo.description, videoInfo.lenght, videoCategory.videoCatID, videoCategory.categoryName, " + "videoInfo.link, videoInfo.fileName, videoInfo.keyWords, videoInfo.width, videoInfo.height FROM videoAuthor " + "JOIN videoInfo ON videoAuthor.videoAuthID = videoInfo.videoAuthID " + "JOIN videoCategory ON videoInfo.videoCatID = videoCategory.VideoCatID " + "WHERE videoInfoID=@videoInfoID", conn); ddlAuthComm = new SqlCommand("SELECT videoAuthID, authorName FROM videoAuthor", conn); cbEdComm = new SqlCommand("SELECT videoEdID, edition FROM videoEdition", conn); cbEdCKComm = new SqlCommand("SELECT videoEdID FROM videoEditions WHERE videoInfoID=@videoInfoID", conn); ddlCatComm = new SqlCommand("SELECT videoCatID, categoryName FROM videoCategory", conn); impStepsComm = new SqlCommand("SELECT impStepID, impStepName, Priority FROM impSteps ORDER BY Priority ASC", conn); impStepsCKComm = new SqlCommand("SELECT impStepID FROM impStepVids WHERE videoInfoID=@videoInfoID", conn); comm.Parameters.Add("videoInfoID", SqlDbType.Int); comm.Parameters["videoInfoID"].Value = videoInfoID; cbEdCKComm.Parameters.Add("videoInfoID", SqlDbType.Int); cbEdCKComm.Parameters["videoInfoID"].Value = videoInfoID; impStepsCKComm.Parameters.Add("videoInfoID", SqlDbType.Int); impStepsCKComm.Parameters["videoInfoID"].Value = videoInfoID; try { conn.Open(); //Bind video author drop down list reader = ddlAuthComm.ExecuteReader(); DropDownList cboAuthor = (DropDownList)videoDetail.FindControl("ddlVidAuthorEdit"); cboAuthor.DataSource = reader; cboAuthor.DataValueField = "videoAuthID"; cboAuthor.DataTextField = "authorName"; cboAuthor.DataBind(); reader.Close(); // Bind video edition Check Box List reader = cbEdComm.ExecuteReader(); CheckBoxList cboEdition = (CheckBoxList)videoDetail.FindControl("cbVidEdEdit"); cboEdition.DataSource = reader; cboEdition.DataValueField = "videoEdID"; cboEdition.DataTextField = "edition"; cboEdition.DataBind(); reader.Close(); // Bind video Category drop down list reader = ddlCatComm.ExecuteReader(); DropDownList cboCategory = (DropDownList)videoDetail.FindControl("ddlVidCatEdit"); cboCategory.DataSource = reader; cboCategory.DataValueField = "videoCatID"; cboCategory.DataTextField = "categoryName"; cboCategory.DataBind(); reader.Close(); // Bind associated video edit mode checkboxes reader = impStepsComm.ExecuteReader(); CheckBoxList cboVidDetailsImpStepsCB = (CheckBoxList)videoDetail.FindControl("videoImpStepsCBEdit"); cboVidDetailsImpStepsCB.DataSource = reader; cboVidDetailsImpStepsCB.DataTextField = "impStepName"; cboVidDetailsImpStepsCB.DataValueField = "impStepID"; cboVidDetailsImpStepsCB.DataBind(); reader.Close(); // Bind author selected value drop down list. reader = comm.ExecuteReader(); reader.Read(); cboAuthor.SelectedValue = reader["videoAuthID"].ToString(); reader.Close(); //Bind edition selected values reader = cbEdCKComm.ExecuteReader(); while (reader.Read()) { ListItem cboListItemEd = cboEdition.Items.FindByValue(reader["videoEdId"].ToString()); if (cboListItemEd != null) { cboListItemEd.Selected = true; } } reader.Close(); //Bind category selected value drop down list reader = comm.ExecuteReader(); reader.Read(); cboCategory.SelectedValue = reader["videoCatID"].ToString(); reader.Close(); //Bind imp steps selected values reader = impStepsCKComm.ExecuteReader(); while (reader.Read()) { ListItem cboListItem = cboVidDetailsImpStepsCB.Items.FindByValue(reader["impStepID"].ToString()); if (cboListItem != null) { cboListItem.Selected = true; } } reader.Close(); conn.Close(); } catch (SqlException ex) { dbErrorMessage.Style.Clear(); dbErrorMessage.Text = "<div class=\"errorMessageSearch\">The following Error has occurred:<br /> [" + ex.Message + "]</div>"; } finally { conn.Close(); } } else { videoDetail.ChangeMode(DetailsViewMode.ReadOnly); Session["videoEdit"] = ""; BindVideoDetails(); h3Title.Text = "Video Detail Information"; } } }
protected void dvAddTransferFee_ModeChanging(object sender, DetailsViewModeEventArgs e) { ScreenMode = ScreenModeState.Main; }
protected void ItemReviewAdder_ModeChanging(object sender, DetailsViewModeEventArgs e) { this.MainMV.SetActiveView(this.ItemDetailsView); e.Cancel = true; }
protected void DetailsView1_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit || e.Cancel) Response.Redirect("~/EditareFabrici.aspx"); }
protected void dtgv_ModeChanging(object sender, DetailsViewModeEventArgs e) { }
protected void DocumentDW_ModeChanging(object sender, DetailsViewModeEventArgs e) { //No code required }
protected void DVEducation_ModeChanging(object sender, DetailsViewModeEventArgs e) { DVEducation.ChangeMode(e.NewMode); LoadEducation(); }
protected void MainDetails_ModeChanging( object sender, DetailsViewModeEventArgs e ) { // canceling, so switch back to the main grid view if (e.CancelingEdit) ShowGrid(); }
// *******************************************************************Handle the edit event and load states drop down menu in edit mode. protected void memberAdminDetailView_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (!e.CancelingEdit) { memberAdminDetailView.ChangeMode(e.NewMode); BindmemberDetails(); int userID = Convert.ToInt32(Session["adminSelectUserID"]); Session["adminSelectUserID"] = userID.ToString(); SqlConnection conn; SqlCommand statusComm; SqlCommand permissionComm; SqlCommand statesComm; SqlDataReader reader; string connectionString = ConfigurationManager.ConnectionStrings["leoQuickStart"].ConnectionString; conn = new SqlConnection(connectionString); statusComm = new SqlCommand("SELECT userStatusID, name FROM userStatus", conn); statusComm.Parameters.Add("userID", SqlDbType.Int); statusComm.Parameters["userID"].Value = userID; permissionComm = new SqlCommand("SELECT permissionID, permissionLevel FROM permission", conn); permissionComm.Parameters.Add("userID", SqlDbType.Int); permissionComm.Parameters["userID"].Value = userID; statesComm = new SqlCommand("SELECT abbr, name FROM us_postal_codes", conn); statesComm.Parameters.Add("userID", SqlDbType.Int); statesComm.Parameters["userID"].Value = userID; try { conn.Open(); //Bind status table to edit mode of memberAdminDetailView reader = statusComm.ExecuteReader(); DropDownList cboStatus = (DropDownList)memberAdminDetailView.FindControl("dropDownListStatusEdit"); cboStatus.DataSource = reader; cboStatus.DataValueField = "userStatusID"; cboStatus.DataTextField = "name"; cboStatus.DataBind(); reader.Close(); //Bind permission table to edit mode of memberAdminDetailView reader = permissionComm.ExecuteReader(); DropDownList cboPermission = (DropDownList)memberAdminDetailView.FindControl("dropDownListPermissionEdit"); cboPermission.DataSource = reader; cboPermission.DataValueField = "permissionID"; cboPermission.DataTextField = "permissionLevel"; cboPermission.DataBind(); reader.Close(); //Bind states table to edit mode of memberAdminDetailView reader = statesComm.ExecuteReader(); DropDownList cboState = (DropDownList)memberAdminDetailView.FindControl("dropDownListStateEdit"); cboState.DataSource = reader; cboState.DataValueField = "abbr"; cboState.DataTextField = "name"; cboState.DataBind(); reader.Close(); conn.Close(); //Create Queries to find exact data for Status, Permission and State for unique user statusComm = new SqlCommand("SELECT userStatusID FROM [user] WHERE userID=" + userID, conn); permissionComm = new SqlCommand("SELECT permissionID FROM [user] WHERE userID=" + userID, conn); statesComm = new SqlCommand("SELECT [state] FROM [user] WHERE userID=" + userID, conn); conn.Open(); // Bind unique informatin to Status for user reader = statusComm.ExecuteReader(); reader.Read(); cboStatus.SelectedValue = reader["userStatusID"].ToString(); reader.Close(); // Bind unique informatin to Permission for user reader = permissionComm.ExecuteReader(); reader.Read(); cboPermission.SelectedValue = reader["permissionID"].ToString(); reader.Close(); // Bind unique informatin to State for user reader = statesComm.ExecuteReader(); reader.Read(); cboState.SelectedValue = reader["state"].ToString(); reader.Close(); } catch (SqlException ex) { dbErrorMessage.Text = "<div class=\"errorMessage\">The following Error has occurred:<br /> [" + ex.Message + "]</div>"; } finally { conn.Close(); h3Title.Text = "Edit Details"; } } else { memberAdminDetailView.ChangeMode(DetailsViewMode.ReadOnly); BindmemberDetails(); BindMemberAdminGrid(); h3Title.Text = "Member Detail View"; } }
protected void dvDocument_ModeChanging(object sender, DetailsViewModeEventArgs e) { if (e.CancelingEdit) { Response.Redirect("~/CRM/Documents/Index.aspx"); } }