Exemplo n.º 1
0
    public bool IsExisted(TimeslotMappingInfo info)
    {
        //db.Open();
        String query = "select count(*)  from TimeslotMapping "
                       + " where RowNo = @RowNo ";
        var obj = (List <int>)db.Query <int>(query, info, transaction);

        //db.Close();
        return(obj[0] > 0);
    }
Exemplo n.º 2
0
    public void Update(TimeslotMappingInfo info)
    {
        string query = " UPDATE [dbo].[TimeslotMapping] SET  "
                       + " [TimeSlotCode] = @TimeSlotCode "
                       + ", [Description] = @Description "
                       + " where RowNo = @RowNo ";


        db.Execute(query, info, transaction);
    }
Exemplo n.º 3
0
    public void Insert(TimeslotMappingInfo info)
    {
        string query = "INSERT INTO [dbo].[TimeslotMapping] ( [TimeSlotCode] "
                       + ",[RowNo] "
                       + ",[Description] "
                       + ") "
                       + "VALUES ( @TimeSlotCode "
                       + ",@RowNo "
                       + ",@Description "
                       + ") ";


        db.Execute(query, info, this.transaction);
    }