コード例 #1
0
 public bool baocaotuan_xoa(DOT_baocaotuan bc)
 {
     using (SqlConnection conn = getConnect())
     {
         SqlCommand cmd = new SqlCommand("sp_delete_baocaotuan", conn);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.Add(new SqlParameter("@mabcn", bc.mabcn));
         cmd.ExecuteNonQuery();
     }
     return(true);
 }
コード例 #2
0
 public int baocaotuan_them(DOT_baocaotuan bc)
 {
     using (SqlConnection conn = getConnect())
     {
         SqlCommand cmd = new SqlCommand("sp_insert_baocaotuan", conn);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.Add(new SqlParameter("@manv", bc.manv));
         cmd.Parameters.Add(new SqlParameter("@macv", bc.macv));
         cmd.Parameters.Add(new SqlParameter("@ghichu", bc.ghichu));
         cmd.Parameters.Add(new SqlParameter("@ngay", bc.ngay));
         cmd.Parameters.Add(new SqlParameter("@tiendo", bc.tiendo));
         cmd.Parameters.Add(new SqlParameter("@dexuat", bc.dexuat));
         return(Convert.ToInt32(cmd.ExecuteScalar()));
     }
 }
コード例 #3
0
 public bool baocaotuan_sua(DOT_baocaotuan bc)
 {
     using (SqlConnection conn = getConnect())
     {
         SqlCommand cmd = new SqlCommand("sp_update_baocaotuan", conn);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.Add(new SqlParameter("@mabcn", bc.mabcn));
         cmd.Parameters.Add(new SqlParameter("@manv", bc.manv));
         cmd.Parameters.Add(new SqlParameter("@macv", bc.macv));
         cmd.Parameters.Add(new SqlParameter("@ghichu", bc.ghichu));
         cmd.Parameters.Add(new SqlParameter("@ngay", bc.ngay));
         cmd.Parameters.Add(new SqlParameter("@tiendo", bc.tiendo));
         cmd.Parameters.Add(new SqlParameter("@dexuat", bc.dexuat));
         cmd.ExecuteNonQuery();
     }
     return(true);
 }