public bool InsertMailReceiverSetting(mail_receiver_setting oMailReceiverSetting)
 {
     try
     {
         mail_receiver_setting insertMailReceiverSetting = new mail_receiver_setting
         {
             process_code_id = oMailReceiverSetting.process_code_id,
             receiver_name   = oMailReceiverSetting.receiver_name,
             receiver_email  = oMailReceiverSetting.receiver_email,
             created_by      = oMailReceiverSetting.created_by,
             created_date    = oMailReceiverSetting.created_date,
             updated_by      = oMailReceiverSetting.updated_by,
             updated_date    = oMailReceiverSetting.updated_date,
             is_active       = oMailReceiverSetting.is_active,
             is_deleted      = oMailReceiverSetting.is_deleted
         };
         _entities.mail_receiver_setting.Add(insertMailReceiverSetting);
         _entities.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool DeleteMailReceiverSetting(long mail_receiver_setting_id)
 {
     try
     {
         mail_receiver_setting oMailReceiverSetting = _entities.mail_receiver_setting.FirstOrDefault(st => st.mail_receiver_setting_id == mail_receiver_setting_id);
         oMailReceiverSetting.is_deleted = true;
         _entities.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool UpdateMailReceiverSetting(mail_receiver_setting oMailReceiverSetting)
 {
     try
     {
         mail_receiver_setting con = _entities.mail_receiver_setting.Find(oMailReceiverSetting.mail_receiver_setting_id);
         con.process_code_id = oMailReceiverSetting.process_code_id;
         con.receiver_name   = oMailReceiverSetting.receiver_name;
         con.receiver_email  = oMailReceiverSetting.receiver_email;
         con.updated_date    = DateTime.Now;
         con.is_active       = oMailReceiverSetting.is_active;
         _entities.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }