Exemplo n.º 1
0
        public int DeleteLuong(Luong luong)
        {
            List <SqlParameter> paras = new List <SqlParameter>();

            paras.Add(new SqlParameter("@macn", luong.MaPhuCap));
            return(p.ExecNonQuery("", CommandType.StoredProcedure, paras));
        }
Exemplo n.º 2
0
 public List <Luong> ViewLuong(string sql)
 {
     try
     {
         List <Luong>  list = new List <Luong>();
         SqlDataReader dr   = p.View(sql);
         if (dr != null)
         {
             string   MaLuong, MaHSL, MaPhuCap;
             int      TienLuong, Thang, Nam;
             TimeSpan GioLamViec;
             while (dr.Read())
             {
                 MaLuong    = dr.GetString(2);
                 MaHSL      = dr.GetString(3);
                 GioLamViec = dr.GetTimeSpan(5);
                 MaPhuCap   = dr.GetString(4);
                 TienLuong  = dr.GetInt32(6);
                 Thang      = dr.GetInt32(0);
                 Nam        = dr.GetInt32(1);
                 Luong l = new Luong(MaLuong, MaHSL, GioLamViec, MaPhuCap, TienLuong, Thang, Nam);
                 list.Add(l);
             }
         }
         return(list);
     }
     catch (SqlException p)
     {
         throw p;
     }
 }
Exemplo n.º 3
0
 public int Update(Luong obj)
 {
     MySqlParameter[] para =
     {
         new MySqlParameter("idHSL", obj.HeSoLuong),
         new MySqlParameter("lcb",   obj.LuongCB)
     };
     return(db.ExecuteSQL("Luong_Update", para));
 }