protected void Page_Load(object sender, EventArgs e) { PhysicianGridView.ForceDataRowType(typeof(ClarityDBSet.PhysicianDSRow)); if (!IsPostBack && !IsCallback) { PhysicianGridView.DataBind(); } }
protected void PhysicianGridView_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { try { DBAgent = new DataAccessProvider(DataAccessProvider.ParamType.ServerCredentials, ConfigurationManager.AppSettings["DBServerName"], ConfigurationManager.AppSettings["DBUserName"], ConfigurationManager.AppSettings["DBPassword"]); DBAgent.AddParameter("@ParamPhysicianID", e.Keys[0]); DBAgent.AddParameter("@ParamUpdatedBy", Session["LoginID"]); DBAgent.ExecuteNonQuery("dbo.spDeletePhysician"); e.Cancel = true; PhysicianGridView.DataBind(); } catch (Exception ex) { CommonHelpers.writeLogToFile("PhysicianGridView_RowDeleting: Physician.aspx", ex.Message); } }