Ejemplo n.º 1
0
 public void UbdateEmp(Employeeinfo Emp)
 {
     using (IDbConnection dbConnection = connection)
     {
         string sQuery = @"UBDATE Emptable SET EmpName=@EmpName,Department=@Department,Salary=@Salary WHERE EmpId=@EmpId";
         dbConnection.Open();
         dbConnection.Query(sQuery, Emp);
     }
 }
Ejemplo n.º 2
0
 public void AddEmployee(Employeeinfo ecAdd)
 {
     using (IDbConnection dbConnection = connection)
     {
         string sQuery = @"INSERT INTO EMPTABLE(EmpName,Department,Salary)VALUES(@EmpName,@Department,@Salary)";
         dbConnection.Open();
         dbConnection.Execute(sQuery, ecAdd);
     }
 }