コード例 #1
0
 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        = "";
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     MvDepartmentMaster.SetActiveView(MvDepartmentMaster.Views[0]);
     GvDepartmentMaster.DataBind();
 }
コード例 #4
0
 protected void GvDepartmentMaster_SelectedIndexChanged(object sender, EventArgs e)
 {
     MvDepartmentMaster.SetActiveView(MvDepartmentMaster.Views[1]);
     fvDepartmentMaster.ChangeMode(FormViewMode.Edit);
 }