protected void btnNew_Click(object sender, EventArgs e) { ((IGRSS_Default)this.Master).HideStatusMessage(); MvDepartmentMaster.SetActiveView(MvDepartmentMaster.Views[1]); fvDepartmentMaster.ChangeMode(FormViewMode.Insert); ((TextBox)fvDepartmentMaster.FindControl("txtDescriptionIns")).Text = ""; ((TextBox)fvDepartmentMaster.FindControl("txtNameIns")).Text = ""; }
protected void odsDepartmentMasterById_Inserted(object sender, ObjectDataSourceStatusEventArgs e) { MvDepartmentMaster.SetActiveView(MvDepartmentMaster.Views[0]); GvDepartmentMaster.DataBind(); if (e.Exception == null) { if (Equals(e.ReturnValue, true)) { ((IGRSS_Default)this.Master).ShowStatusMessage(Status_Messages.SaveSucess, Status_Messages.SaveSucessDescription, MessageType.Success); } else { ((IGRSS_Default)this.Master).ShowStatusMessage(Status_Messages.SaveFailed, "Record already Exists!", MessageType.Error); } } else { ((IGRSS_Default)this.Master).ShowStatusMessage(Status_Messages.SaveFailed, e.Exception.Message, MessageType.Error); } }
protected void btnCancel_Click(object sender, EventArgs e) { MvDepartmentMaster.SetActiveView(MvDepartmentMaster.Views[0]); GvDepartmentMaster.DataBind(); }
protected void GvDepartmentMaster_SelectedIndexChanged(object sender, EventArgs e) { MvDepartmentMaster.SetActiveView(MvDepartmentMaster.Views[1]); fvDepartmentMaster.ChangeMode(FormViewMode.Edit); }