コード例 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void InitDeleteMultiple(object sender, DirectEventArgs e)
 {
     try
     {
         var recordIds = hdfRecordIds.Text.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
         if (recordIds.Count > 0 && !string.IsNullOrEmpty(hdfMonth.Text) && !string.IsNullOrEmpty(hdfYear.Text))
         {
             //delete
             EmployeeArgumentController.DeleteByCondition(recordIds, null, null, Convert.ToInt32(hdfMonth.Text), Convert.ToInt32(hdfYear.Text));
         }
         gpEmployeeArgument.Reload();
     }
     catch (Exception exception)
     {
         Dialog.ShowError(exception);
     }
 }
コード例 #2
0
        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Delete(object sender, DirectEventArgs e)
        {
            try
            {
                if (!string.IsNullOrEmpty(hdfRecordId.Text) && !string.IsNullOrEmpty(hdfMonth.Text) && !string.IsNullOrEmpty(hdfYear.Text))
                {
                    //delete
                    EmployeeArgumentController.DeleteByCondition(null, Convert.ToInt32(hdfRecordId.Text), null, Convert.ToInt32(hdfMonth.Text), Convert.ToInt32(hdfYear.Text));
                }

                // reload data
                gpEmployeeArgument.Reload();
            }
            catch (Exception exception)
            {
                Dialog.ShowError(exception);
            }
        }