public JsonResult DeleteReasonForTransfer(ReasonForTransferingDTO ResForTrans)
        {
            bool c = employeeMasters.DeleteReasonForTransferingRecord(ResForTrans.RecordId);


            return(new JsonResult {
                Data = c, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult UpdateReasonForTransferRecord(ReasonForTransferingDTO ResForTrans)
        {
            bool c = employeeMasters.UpdateReasonForTransferingRecord(ResForTrans);
            List <ReasonForTransferingDTO> all = employeeMasters.BindReasonForTransfering();
            var result = new { Success = c, griddata = all };

            return(new JsonResult {
                Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
 public JsonResult CheckReasonForTransfering(ReasonForTransferingDTO ResForTrans)
 {
     try
     {
         var c = employeeMasters.CheckReasonForTransfering(ResForTrans);
         return(new JsonResult {
             Data = c, JsonRequestBehavior = JsonRequestBehavior.AllowGet
         });
     }
     catch (Exception ex)
     {
         EventLogger.WriteToErrorLog(ex, "ReasonForTransfer");
         return(Json(new { success = false, errorMessage = ex.Message }));
     }
 }
        public JsonResult SaveReasonForTransferDetails(ReasonForTransferingDTO ResForTrans)
        {
            try
            {
                ResForTrans.StatusID  = 1;
                ResForTrans.createdby = Convert.ToInt32(Session["UserId"]);
                bool res = employeeMasters.Save(ResForTrans);

                List <ReasonForTransferingDTO> all = employeeMasters.BindReasonForTransfering();
                var result = new { Success = res, griddata = all };
                return(new JsonResult {
                    Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet
                });
            }
            catch (Exception ex)
            {
                EventLogger.WriteToErrorLog(ex, "Reason_for_Transfer");
                return(Json(new { success = false, errorMessage = ex.Message }));
            }
        }