Exemple #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);
    }
Exemple #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);
    }
Exemple #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);
    }