public appDB.TimeSlipBranchDataTable LoadBranchBySRPID(int srpId) { this.sqlDa.SelectCommand = sqlSelect; this.sqlSelect.Parameters.Clear(); this.sqlSelect.CommandText = "[TimeSlipBranchBySRPID]"; this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SRPID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters["@SRPID"].Value = srpId; appDB.TimeSlipBranchDataTable dt = new appDB.TimeSlipBranchDataTable(); Fill(dt); return(dt); }
public appDB.TimeSlipBranchDataTable LoadBranchByOfficerId(int officerId, DateTime startDate, DateTime endDate) { this.sqlDa.SelectCommand = sqlSelect; this.sqlSelect.Parameters.Clear(); this.sqlSelect.CommandText = "[TimeSlipBranchByOfficerId]"; this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@OfficerId", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@startdate", System.Data.SqlDbType.SmallDateTime, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@enddate", System.Data.SqlDbType.SmallDateTime, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters["@OfficerId"].Value = officerId; this.sqlSelect.Parameters["@startdate"].Value = startDate; this.sqlSelect.Parameters["@enddate"].Value = endDate; appDB.TimeSlipBranchDataTable dt = new appDB.TimeSlipBranchDataTable(); Fill(dt); return(dt); }