public void DailyAttendanceDetailsDeleteAll(decimal decdailyAttendanceMasterId)
 {
     try
     {
         SpDailyAttendanceDetails.DailyAttendanceDetailsDeleteAll(decdailyAttendanceMasterId);
     }
     catch (Exception ex)
     {
         MessageBox.Show("A4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #2
0
 /// <summary>
 /// Function to Delete
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         DailyAttendanceDetailsSP spDailyAttendanceDetails = new DailyAttendanceDetailsSP();
         spDailyAttendanceDetails.DailyAttendanceDetailsDeleteAll(Convert.ToDecimal(dgvAttendance.CurrentRow.Cells["dgvtxtdailyAttendanceMasterId"].Value.ToString()));
         Messages.DeletedMessage();
         Clear();
         btnDelete.Enabled = false;
         btnSave.Text      = "Save";
     }
     catch (Exception ex)
     {
         MessageBox.Show("A5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #3
0
        public ActionResult DeleteFunction(string date, string masterId)
        {
            bool   isSuccess  = true;
            string message    = string.Empty;
            string jsonResult = string.Empty;

            try
            {
                DailyAttendanceDetailsSP spDailyAttendanceDetails = new DailyAttendanceDetailsSP();
                spDailyAttendanceDetails.DailyAttendanceDetailsDeleteAll(Convert.ToDecimal(masterId));

                DataTable dtblAttendence = GetAttendenceFromDB(date);
                jsonResult = Utils.DataTableToJsonString(dtblAttendence);
            }
            catch (Exception ex)
            {
                isSuccess = false;
                message   = ex.Message;
            }
            return(Json(new { isSuccess, message, data = jsonResult }));
        }