Ejemplo n.º 1
0
 public static DataSet GetNhatKyTheoNgay(PLMultiCombobox NV_ID, DateTime TuNgay, DateTime DenNgay)
 {
     DataSet ds = new DataSet();
     DatabaseFB db = HelpDB.getDatabase();
     DbCommand cmd = db.GetStoredProcCommand("IN_NHAT_KY_CONG_VIEC");
     db.AddInParameter(cmd, "@TUNGAY", DbType.DateTime, TuNgay);
     db.AddInParameter(cmd, "@DENNGAY", DbType.DateTime, DenNgay);
     db.LoadDataSet(cmd, ds, "IN_NHAT_KY_CONG_VIEC");
     #region Lọc lại dữ liệu trên DataSet
     DataRow[] dsrow = ds.Tables[0].Select("NV_ID in " + NV_ID._getStrSelectedIDs());
     DataSet NewDs = ds.Clone();
     foreach (DataRow item in dsrow)
         NewDs.Tables[0].ImportRow(item);
     #endregion
     return NewDs;
 }
Ejemplo n.º 2
0
 public static DataSet GetThoiGianLamViec(PLMultiCombobox NV_ID, bool LoaiLV, bool LoaiDTVS, bool LoaiNP, DateTime TuNgay, DateTime DenNgay)
 {
     DataSet ds = new DataSet();
     DatabaseFB db = HelpDB.getDatabase();
     DbCommand cmd = db.GetStoredProcCommand("IN_THOI_GIAN_LAM_VIEC");
     db.AddInParameter(cmd, "@ILOAILV", DbType.Byte, LoaiLV == true ? 1 : 0);
     db.AddInParameter(cmd, "@ILOAIDTVS", DbType.Byte, LoaiDTVS == true ? 2 : 0);
     db.AddInParameter(cmd, "@ILOAINP", DbType.Byte, LoaiNP == true ? 3 : 0);
     db.AddInParameter(cmd, "@TUNGAY", DbType.DateTime, TuNgay);
     db.AddInParameter(cmd, "@DENNGAY", DbType.DateTime, DenNgay);
     db.LoadDataSet(cmd, ds, "IN_THOI_GIAN_LAM_VIEC");
     #region Lọc lại dữ liệu trên DataSet
     DataRow[] dsrow = ds.Tables[0].Select("NV_ID in " + NV_ID._getStrSelectedIDs());
     DataSet NewDs = ds.Clone();
     foreach (DataRow item in dsrow)
         NewDs.Tables[0].ImportRow(item);
     #endregion
     return NewDs;
 }
Ejemplo n.º 3
0
 public static string GetMultiValues(PLMultiCombobox multi)
 {
     string strIDs = multi._getStrSelectedIDs();
     if (strIDs == "(-1)") return "";
     strIDs = strIDs.TrimStart('(').TrimEnd(')');
     strIDs = "," + strIDs + ",";
     return strIDs;
 }