protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e) { DeleteFiles df = new DeleteFiles(); df.DeleteAllFiles(Convert.ToInt32(e.Keys[0]), acadSerId); dll_AcademicService dll = new dll_AcademicService(username, durationId); dll.deleteData(Convert.ToInt32(((HiddenField)ASPxGridView1.FindRowCellTemplateControl(ASPxGridView1.FindVisibleIndexByKeyValue(e.Keys[ASPxGridView1.KeyFieldName]), (GridViewDataColumn)ASPxGridView1.Columns["AcademicServiceTypeId"], "hidDeleteId")).Value)); e.Cancel = true; FillGridView(); }
protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e) { AcademicService acs = new AcademicService(); acs.UserName = username; acs.DurationId = durationId; acs.AcademicServiceTypeId = Convert.ToInt32(((ASPxComboBox)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["AcademicServiceTypeId"], "ddEditAcademicServiceTypeId")).Value); acs.ValueOfService = Convert.ToInt32(((TextBox)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["ValueOfService"], "txtEditValueOfService")).Text); dll_AcademicService dll = new dll_AcademicService(username, durationId); dll.insertData(acs); e.Cancel = true; ASPxGridView1.CancelEdit(); FillGridView(); }
protected void ASPxGridView1_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) { AcademicService acs = new AcademicService(); acs.AcademicServiceId = Convert.ToInt32(((HiddenField)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["AcademicServiceTypeId"], "hidEditId")).Value); acs.AcademicServiceTypeId = Convert.ToInt32(((ASPxComboBox)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["AcademicServiceTypeId"], "ddEditAcademicServiceTypeId")).Value); acs.ValueOfService = Convert.ToInt32(((ASPxSpinEdit)ASPxGridView1.FindEditRowCellTemplateControl((GridViewDataColumn)ASPxGridView1.Columns["ValueOfService"], "txtEditValueOfService")).Text); dll_AcademicService dll = new dll_AcademicService(username, durationId); dll.updateData(acs); this.ASPxGridView1.CancelEdit(); e.Cancel = true; FillGridView(); }