예제 #1
0
    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));
    }
예제 #2
0
 private void _timer_Tick(object sender, object e)
 {
     HideDetails.Begin();
     _timer?.Stop();
 }