public static string updateHide(HideDetails detail) { string config = Convert.ToString(ConfigurationManager.ConnectionStrings["dbcon"]); List <HideDetails> HideDetails = new List <HideDetails>(); SqlConnection con = new SqlConnection(config); con.Open(); using ( SqlCommand cmd = new SqlCommand("update HR_Vacation_Type set Hide= @Hide where id = @id;", con) ) { cmd.Parameters.AddWithValue("@id", detail.id); cmd.Parameters.AddWithValue("@Hide", detail.Hide); cmd.ExecuteNonQuery(); } con.Close(); return(JsonConvert.SerializeObject(HideDetails)); }
private void _timer_Tick(object sender, object e) { HideDetails.Begin(); _timer?.Stop(); }