private MeCreditcardHistoryInfo getDataReader(iSqlDataReader dar) { try { int i = -1; MeCreditcardHistoryInfo info = new MeCreditcardHistoryInfo(); info.Memberid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Creditcardid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Balance = dar.IsDBNull(++i) ? 0 : dar.GetFloat(i); info.Amount = dar.IsDBNull(++i) ? 0 : dar.GetFloat(i); info.Addorsub = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
internal AutoMapper(DbCommandData dbCommandData, Type itemType) { _dbCommandData = dbCommandData; _reader = dbCommandData.Reader.InnerReader; _properties = ReflectionHelper.GetProperties(itemType); _fields = DataReaderHelper.GetDataReaderFields(_reader); }
public BlockWithSources(System.Data.IDataReader rd) : base(rd.GetString(0), rd.GetInt64(1)) { m_rd = rd; Done = !m_rd.Read(); }
private LibrariesInfo getDataReader(iSqlDataReader dar) { try { int i = -1; LibrariesInfo info = new LibrariesInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Introduce = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Filepreview = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timecreate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Allowcomment = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Album = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Viewcounter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Relateditem = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public PurchaseVoucherModel GetAllPurcahseVoucherbyId(int id) { PurchaseVoucherModel objpurchase = new PurchaseVoucherModel(); string Query = "SELECT * FROM Trans_purchase_voucher WHERE transpvId=" + id; System.Data.IDataReader dr = _dbHelper.ExecuteDataReader(Query, _dbHelper.GetConnObject()); while (dr.Read()) { objpurchase.PV_Id = DataFormat.GetInteger(dr["TransPVId"]); objpurchase.Series = dr["series"].ToString(); objpurchase.PV_Date = DataFormat.GetDateTime(dr["pv_Date"]); objpurchase.Voucher_Number = DataFormat.GetInteger(dr["Voucherno"]); objpurchase.BillNo = DataFormat.GetInteger(dr["BillNo"]); objpurchase.PurchaseType = dr["pv_Type"].ToString(); objpurchase.Party = dr["party"].ToString(); objpurchase.MatCenter = dr["MatCenter"].ToString(); objpurchase.Narration = dr["Narration"].ToString(); //objpurchase.t = Convert.ToDecimal(dr["TotalQty"]); //objpurchase.TotalAmount = Convert.ToDecimal(dr["TotalAmount"].ToString()); //objpurchase.BSTotalAmount = Convert.ToDecimal(dr["BSTotalAmount"]); //SELECT Purchase Items string itemQuery = "SELECT * FROM Trans_pv_items WHERE TranspvId=" + id; System.Data.IDataReader drItems = _dbHelper.ExecuteDataReader(itemQuery, _dbHelper.GetConnObject()); objpurchase.Item_Voucher = new List <Item_VoucherModel>(); Item_VoucherModel objitem; while (drItems.Read()) { objitem = new Item_VoucherModel(); objitem.Item_ID = Convert.ToInt32(drItems["ItemId"]); objitem.ParentId = DataFormat.GetInteger(drItems["TranspvId"]); objitem.Item = drItems["item"].ToString(); objitem.Batch = drItems["Batch"].ToString(); objitem.Qty = Convert.ToInt32(drItems["qty"].ToString()); objitem.Unit = (drItems["unit"].ToString()); objitem.Price = Convert.ToDecimal(drItems["price"]); objitem.Amount = Convert.ToInt32(drItems["amount"].ToString()); objitem.TotalQty = Convert.ToInt32(drItems["TotalQty"].ToString()); objitem.TotalAmount = Convert.ToDecimal(drItems["TotalAmount"]); objpurchase.Item_Voucher.Add(objitem); } string BSQuery = "SELECT * FROM Trans_pv_BS WHERE TranspvId=" + id; System.Data.IDataReader drbs = _dbHelper.ExecuteDataReader(BSQuery, _dbHelper.GetConnObject()); objpurchase.BillSundry_Voucher = new List <BillSundry_VoucherModel>(); BillSundry_VoucherModel objbs; while (drbs.Read()) { objbs = new BillSundry_VoucherModel(); objbs.BSId = Convert.ToInt32(drbs["BSId"]); objbs.ParentId = DataFormat.GetInteger(drbs["TranspvId"]); objbs.BillSundry = drbs["BillSundry"].ToString(); objbs.Percentage = Convert.ToDecimal(drbs["Percentage"].ToString()); objbs.Amount = Convert.ToDecimal((drbs["Amount"].ToString())); objbs.TotalAmount = Convert.ToDecimal(drbs["TotalAmount"].ToString()); objpurchase.BillSundry_Voucher.Add(objbs); } } return(objpurchase); }
private CategorytypeofInfo getDataReader(iSqlDataReader dar) { try { int i = -1; CategorytypeofInfo info = new CategorytypeofInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); return info; } catch (Exception ex) { throw ex; } }
private BannerInfo getDataReader(iSqlDataReader dar) { try { int i = -1; BannerInfo info = new BannerInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Album = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
private StaticcontentInfo getDataReader(iSqlDataReader dar) { try { int i = -1; StaticcontentInfo info = new StaticcontentInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Separatepage = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Filepath = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? -1 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
private VideoInfo getDataReader(iSqlDataReader dar) { try { int i = -1; VideoInfo info = new VideoInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Tag = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Filepreview = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timecreate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Allowcomment = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Viewcounter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Sourcetype = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Url = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); info.lCategory = (new CCategory(LANG)).Wcmm_Getlist_ofiid(info.Id, Webcmm.Id.Video); info.lCategoryattr = (new CCategoryattr(LANG)).Wcmm_Getlist_ofiid(info.Id, Webcmm.Id.Video); return info; } catch (Exception ex) { throw ex; } }
public List <TransSalesModel> GetAllSalesVouchers() { List <TransSalesModel> lstSalesVouchers = new List <TransSalesModel>(); TransSalesModel objsales; string Query = "SELECT * FROM Trans_Sales"; System.Data.IDataReader dr = _dbHelper.ExecuteDataReader(Query, _dbHelper.GetConnObject()); while (dr.Read()) { objsales = new eSunSpeedDomain.TransSalesModel(); objsales.Trans_Sales_Id = DataFormat.GetInteger(dr["Trans_Sales_Id"]); objsales.Series = dr["Series"].ToString(); objsales.SaleDate = DataFormat.GetDateTime(dr["SaleDate"]); objsales.VoucherNumber = DataFormat.GetInteger(dr["VoucherNumber"]); objsales.SalesType = dr["SalesType"].ToString(); objsales.Party = dr["Party"].ToString(); objsales.MatCentre = dr["MatCentre"].ToString(); objsales.Narration = dr["Narration"].ToString(); objsales.TotalQty = Convert.ToDecimal(dr["TotalQty"]); objsales.TotalAmount = Convert.ToDecimal(dr["TotalAmount"]); objsales.BSTotalAmount = Convert.ToDecimal(dr["BSTotalAmount"]); //SELECT Sales Items string itemQuery = "SELECT * FROM Trans_Sales_Item WHERE TransSalesId=" + objsales.Trans_Sales_Id; System.Data.IDataReader drItem = _dbHelper.ExecuteDataReader(itemQuery, _dbHelper.GetConnObject()); objsales.SalesItem_Voucher = new List <Item_VoucherModel>(); Item_VoucherModel objItemModel; while (drItem.Read()) { objItemModel = new Item_VoucherModel(); objItemModel.ParentId = DataFormat.GetInteger(drItem["TransSalesId"]); objItemModel.Item_ID = DataFormat.GetInteger(drItem["ItemId"]); objItemModel.Item = drItem["Item"].ToString(); objItemModel.Price = Convert.ToDecimal(drItem["Price"]); objItemModel.Qty = Convert.ToDecimal(drItem["Qty"]); objItemModel.Unit = drItem["Unit"].ToString(); objItemModel.Amount = Convert.ToDecimal(drItem["Amount"]); objItemModel.TotalQty = Convert.ToDecimal(drItem["TotalQty"]); objItemModel.TotalAmount = Convert.ToDecimal(drItem["TotalAmount"]); objsales.SalesItem_Voucher.Add(objItemModel); } //SELECT Bill Sundry Voucher items string bsQuery = "SELECT * FROM Trans_Sales_BS WHERE TransSalesId=" + objsales.Trans_Sales_Id; System.Data.IDataReader drBS = _dbHelper.ExecuteDataReader(bsQuery, _dbHelper.GetConnObject()); objsales.SalesBillSundry_Voucher = new List <BillSundry_VoucherModel>(); BillSundry_VoucherModel objBSModel; while (drBS.Read()) { objBSModel = new BillSundry_VoucherModel(); objBSModel.ParentId = DataFormat.GetInteger(drBS["TransSalesId"]); objBSModel.BSId = DataFormat.GetInteger(drBS["BSId"]); objBSModel.BillSundry = drBS["BillSundry"].ToString(); objBSModel.Percentage = Convert.ToDecimal(drBS["Percentage"]); objBSModel.Amount = Convert.ToDecimal(drBS["Amount"]); objBSModel.TotalAmount = Convert.ToDecimal(drBS["TotalAmount"]); objsales.SalesBillSundry_Voucher.Add(objBSModel); } lstSalesVouchers.Add(objsales); } return(lstSalesVouchers); }
public TransSalesModel GetSalesById(String ID) { //List<TransSalesModel> lstSalesVouchers = new List<TransSalesModel>(); TransSalesModel objsales = new TransSalesModel(); string query = string.Empty; query = "SELECT count(*) FROM Trans_Sales"; //int i=_dbHelper.ExecuteNonQuery(query); if (ID == "first") { query = "SELECT TOP 1 * FROM Trans_Sales"; } ID = "1"; if (ID == "last") { query = "SELECT TOP 1 * FROM Trans_Sales order by Trans_Sales_Id desc"; } if (Convert.ToInt32(ID) > 0) { query = "SELECT * FROM Trans_Sales WHERE Trans_sales_id=" + ID; } System.Data.IDataReader dr = _dbHelper.ExecuteDataReader(query, _dbHelper.GetConnObject()); while (dr.Read()) { objsales.Trans_Sales_Id = DataFormat.GetInteger(dr["Trans_Sales_Id"]); objsales.Series = dr["Series"].ToString(); objsales.SaleDate = DataFormat.GetDateTime(dr["SaleDate"]); objsales.VoucherNumber = DataFormat.GetInteger(dr["VoucherNumber"]); objsales.SalesType = dr["SalesType"].ToString(); objsales.Party = dr["Party"].ToString(); objsales.MatCentre = dr["MatCentre"].ToString(); objsales.Narration = dr["Narration"].ToString(); objsales.TotalQty = Convert.ToDecimal(dr["TotalQty"]); objsales.TotalAmount = Convert.ToDecimal(dr["TotalAmount"]); objsales.BSTotalAmount = Convert.ToDecimal(dr["BSTotalAmount"]); objsales.Trans_Sales_Id = objsales.Trans_Sales_Id + 1; //SELECT Sales Items string itemQuery = "SELECT * FROM Trans_Sales_Item WHERE TransSalesId=" + objsales.Trans_Sales_Id; System.Data.IDataReader drItem = _dbHelper.ExecuteDataReader(itemQuery, _dbHelper.GetConnObject()); objsales.SalesItem_Voucher = new List <Item_VoucherModel>(); Item_VoucherModel objItemModel; while (drItem.Read()) { objItemModel = new Item_VoucherModel(); objItemModel.ParentId = DataFormat.GetInteger(drItem["TransSalesId"]); objItemModel.Item_ID = DataFormat.GetInteger(drItem["ItemId"]); objItemModel.Item = drItem["Item"].ToString(); objItemModel.Price = Convert.ToDecimal(drItem["Price"]); objItemModel.Qty = Convert.ToDecimal(drItem["Qty"]); objItemModel.Unit = drItem["Unit"].ToString(); objItemModel.Amount = Convert.ToDecimal(drItem["Amount"]); objItemModel.TotalQty = Convert.ToDecimal(drItem["TotalQty"]); objItemModel.TotalAmount = Convert.ToDecimal(drItem["TotalAmount"]); objsales.SalesItem_Voucher.Add(objItemModel); } //SELECT Bill Sundry Voucher items string bsQuery = "SELECT * FROM Trans_Sales_BS WHERE TransSalesId=" + objsales.Trans_Sales_Id; System.Data.IDataReader drBS = _dbHelper.ExecuteDataReader(bsQuery, _dbHelper.GetConnObject()); objsales.SalesBillSundry_Voucher = new List <BillSundry_VoucherModel>(); BillSundry_VoucherModel objBSModel; while (drBS.Read()) { objBSModel = new BillSundry_VoucherModel(); objBSModel.ParentId = DataFormat.GetInteger(drBS["TransSalesId"]); objBSModel.BSId = DataFormat.GetInteger(drBS["BSId"]); objBSModel.BillSundry = drBS["BillSundry"].ToString(); objBSModel.Percentage = Convert.ToDecimal(drBS["Percentage"]); objBSModel.Amount = Convert.ToDecimal(drBS["Amount"]); objBSModel.TotalAmount = Convert.ToDecimal(drBS["TotalAmount"]); objsales.SalesBillSundry_Voucher.Add(objBSModel); } // lstSalesVouchers.Add(objsales); } return(objsales); }
private void LoadByCardNumber(int pageIndex, int pageSize, CodeFluent.Runtime.PageOptions pageOptions, System.Data.IDataReader reader, string cardNumber) { if ((reader == null)) { throw new System.ArgumentNullException("reader"); } if ((pageIndex < 0)) { pageIndex = 0; } if ((pageSize < 0)) { if ((pageOptions != null)) { pageSize = pageOptions.DefaultPageSize; } else { pageSize = int.MaxValue; } } this.BaseList.Clear(); this.BaseTable.Clear(); int count = 0; int readCount = 0; bool readerRead; for (readerRead = reader.Read(); ((readerRead == true) && ((count < this.MaxCount) && (count < pageSize))); readerRead = reader.Read()) { readCount = (readCount + 1); if ((CodeFluent.Runtime.CodeFluentPersistence.CanAddEntity(pageIndex, pageSize, pageOptions, readCount) == true)) { SoftFluent.Samples.EncryptAspect.Customer customer = new SoftFluent.Samples.EncryptAspect.Customer(); ((CodeFluent.Runtime.ICodeFluentEntity)(customer)).ReadRecord(reader); if ((this.BaseContains(customer) == false)) { this.BaseAdd(customer); count = (count + 1); } customer.EntityState = CodeFluent.Runtime.CodeFluentEntityState.Unchanged; } } }
public static System.Data.IDataReader DataLoadByCardNumber(string cardNumber) { System.Data.IDataReader reader = SoftFluent.Samples.EncryptAspect.CustomerCollection.PageDataLoadByCardNumber(null, cardNumber); return(reader); }
public static System.Data.IDataReader DataLoadAll() { System.Data.IDataReader reader = SoftFluent.Samples.EncryptAspect.CustomerCollection.PageDataLoadAll(null); return(reader); }
// This Method is added by J2CS UPA Portable Framework. Do Not Edit public abstract void Write(object arg1, int arg2, System.Data.IDataReader arg3);
// This Method is added by J2CS UPA Portable Framework. Do Not Edit public abstract object Read(int arg1, System.Data.IDataReader arg2);
private MeProfileInfo getDataReader(iSqlDataReader dar) { try { int i = -1; MeProfileInfo info = new MeProfileInfo(); info.Address = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Zipcode = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.State = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Nationalid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Nationalname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cityid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cityname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Districtid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Districtname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Phone = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.About = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Blog = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Homepage = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Facebook = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Twitter = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Youtube = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Flickr = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Skype = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Yahoo = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Birthday = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Profession = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public ProductionVoucherModel GetAllProductionbyId(int id) { ProductionVoucherModel objProduction = new ProductionVoucherModel(); string Query = "SELECT * FROM Trans_Production_Voucher WHERE Production_Id=" + id; System.Data.IDataReader dr = _dbHelper.ExecuteDataReader(Query, _dbHelper.GetConnObject()); while (dr.Read()) { objProduction.Production_Id = Convert.ToInt32(dr["Production_Id"]); objProduction.Series = dr["series"].ToString(); objProduction.PV_Date = DataFormat.GetDateTime(dr["Production_Date"]); objProduction.Voucher_Number = DataFormat.GetInteger(dr["VoucherNo"]); objProduction.BillNo = Convert.ToInt32(dr["BillNo"].ToString()); objProduction.DueDate = Convert.ToDateTime(dr["DueDate"]); objProduction.ProductionType = dr["Production_Type"].ToString(); objProduction.Party = dr["party"].ToString(); objProduction.MatCenter = dr["MatCenter"].ToString(); objProduction.Narration = dr["Narration"].ToString(); objProduction.TotalQty = Convert.ToDecimal(dr["TotalQty"]); objProduction.TotalAmount = Convert.ToDecimal(dr["TotalAmount"].ToString()); objProduction.BSTotalAmount = Convert.ToDecimal(dr["BSTotalAmount"]); //SELECT Credit Note Accounts string itemQuery = "SELECT * FROM Trans_Production_Items WHERE Production_Id=" + id; System.Data.IDataReader drItems = _dbHelper.ExecuteDataReader(itemQuery, _dbHelper.GetConnObject()); objProduction.Item_Voucher = new List <Item_VoucherModel>(); Item_VoucherModel objitem; while (drItems.Read()) { objitem = new Item_VoucherModel(); objitem.Item_ID = Convert.ToInt32(drItems["ItemId"]); objitem.ParentId = DataFormat.GetInteger(drItems["Production_Id"]); objitem.Item = drItems["item"].ToString(); objitem.Batch = drItems["Batch"].ToString(); objitem.Qty = Convert.ToInt32(drItems["qty"].ToString()); objitem.Unit = (drItems["unit"].ToString()); objitem.Price = Convert.ToDecimal(drItems["price"]); objitem.Amount = Convert.ToInt32(drItems["amount"].ToString()); objitem.TotalAmount = Convert.ToDecimal(drItems["TotalAmount"]); objitem.TotalQty = Convert.ToInt32(drItems["TotalQty"].ToString()); objProduction.Item_Voucher.Add(objitem); } string BSQuery = "SELECT * FROM Trans_Production_BS WHERE Production_Id=" + id; System.Data.IDataReader drbs = _dbHelper.ExecuteDataReader(BSQuery, _dbHelper.GetConnObject()); objProduction.BillSundry_Voucher = new List <BillSundry_VoucherModel>(); BillSundry_VoucherModel objbs; while (drbs.Read()) { objbs = new BillSundry_VoucherModel(); objbs.BSId = Convert.ToInt32(drbs["BSId"]); objbs.ParentId = DataFormat.GetInteger(drbs["Production_Id"]); objbs.BillSundry = drbs["BillSundry"].ToString(); objbs.Percentage = Convert.ToDecimal(drbs["Percentage"].ToString()); objbs.Amount = Convert.ToDecimal((drbs["Amount"].ToString())); objbs.TotalAmount = Convert.ToDecimal(drbs["TotalAmount"].ToString()); objProduction.BillSundry_Voucher.Add(objbs); } } return(objProduction); }
private ProductInfo getDataReader(iSqlDataReader dar) { try { int i = -1; ProductInfo info = new ProductInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Introduce = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Features = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Filepreview = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timecreate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Viewcounter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Provider = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Advertise = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Price = dar.IsDBNull(++i) ? 0 : Math.Round(dar.GetFloat(i)); info.Pricealter = dar.IsDBNull(++i) ? 0 : Math.Round(dar.GetFloat(i), 2); info.Allowcomment = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Album = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Relateditem = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Relatednews = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); info.lCategory = (new CCategory(LANG)).Wcmm_Getlist_ofiid(info.Id, Webcmm.Id.Product); info.lCategoryattr = (new CCategoryattr(LANG)).Wcmm_Getlist_ofiid(info.Id, Webcmm.Id.Product); return info; } catch (Exception ex) { throw ex; } }
/// <summary> /// Returns the DataPoints based specified datapoint name substring. /// </summary> /// <param name="opcServerName">Datapoint server name</param> /// <param name="DataPointNameSubstr"> Datapoint name substring to be queried</param> /// <returns>Datapoints</returns> public List <EtyOPCDataPoint> GetDataPointByName(string opcServerName, string DataPointNameSubstr) { const string Function_Name = "GetDataPointByName"; LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Entered"); List <EtyOPCDataPoint> etyDataPointList = new List <EtyOPCDataPoint>(); /* string localSQL = " SELECT KEYID,PKEYID,DATA_PT_NAME,DATA_PT_DESC,SAMPLE_GRP_ID " + * " FROM OPC_DT_PT " + * " WHERE DATA_PT_SERVER = '" + TrendingHelper.convertGB2312To8859P1(opcServerName.Trim()) + "'" + * " And DATA_PT_NAME LIKE '%" + DAO.Trending.TrendingHelper.convertGB2312To8859P1(DataPointNameSubstr) + "%'"; * * localSQL += " ORDER BY DATA_PT_NAME ";*/ /*string localSQL = " SELECT et.PKEY,et.PARENTKEY,CONCAT(et.NAME,'.Value')as NAME ,et.DESCRIPTION, dt.SAMPLE_GRP_ID FROM ENTITY et, OPC_DT_PT dt" + * " WHERE TYPEKEY = (SELECT PKEY FROM ENTITYTYPE WHERE NAME = 'DataPoint')" + * " AND UPPER(NAME) LIKE '%" + DAOHelper.convertGB2312To8859P1(DataPointNameSubstr) +"%'"+ * " AND et.PKEY = dt.KEYID(+)";*/ string localSQL = " SELECT et.PKEY,et.PARENTKEY,CONCAT(et.NAME,'.Value')as NAME ,et.DESCRIPTION, dt.SAMPLE_GRP_ID FROM ENTITY et LEFT JOIN OPC_DT_PT dt" + " ON et.PKEY = dt.KEYID WHERE TYPEKEY = (SELECT PKEY FROM ENTITYTYPE WHERE NAME = 'DataPoint')" + " AND UPPER(NAME) LIKE '%" + DAOHelper.convertGB2312To8859P1(DataPointNameSubstr) + "%'"; localSQL += " ORDER BY NAME "; System.Data.IDataReader drReader = SimpleDatabase.GetInstance().ExecuteQuery(localSQL); if (drReader != null) { try { while (drReader.Read()) { EtyOPCDataPoint etyDataPoint = new EtyOPCDataPoint(); if (!drReader.IsDBNull(drReader.GetOrdinal("PKEY"))) { etyDataPoint.OPCDataPointId = Convert.ToDouble(drReader["PKEY"]); } if (!drReader.IsDBNull(drReader.GetOrdinal("PARENTKEY"))) { etyDataPoint.OPCParentDataPointId = Convert.ToDouble(drReader["PARENTKEY"]); } if (!drReader.IsDBNull(drReader.GetOrdinal("NAME"))) { etyDataPoint.OPCDataPointName = DAOHelper.convert8859P1ToGB2312(drReader["NAME"].ToString()); } if (!drReader.IsDBNull(drReader.GetOrdinal("DESCRIPTION"))) { etyDataPoint.OPCDataPointDesc = DAOHelper.convert8859P1ToGB2312(drReader["DESCRIPTION"].ToString()); } if (!drReader.IsDBNull(drReader.GetOrdinal("SAMPLE_GRP_ID"))) { etyDataPoint.OPCSampleGrpId = Convert.ToDouble(drReader["SAMPLE_GRP_ID"]); } etyDataPointList.Add(etyDataPoint); } } catch (System.Exception ex) { LogHelper.Error(CLASS_NAME, Function_Name, ex.ToString()); } drReader.Close(); drReader.Dispose(); } LogHelper.Trace(CLASS_NAME, Function_Name, "Function_Exited"); return(etyDataPointList); }
private UserInfo getDataReader(iSqlDataReader dar) { try { int i = -1; UserInfo info = new UserInfo(); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Password = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Email = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Pis = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Pid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Depth = dar.IsDBNull(++i) ? 1 : dar.GetInt32(i); info.Logincache = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Loginfirst = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); if (info.iRight == null) info.iRight = (new CUserright()).Getinfo(info.Id); return info; } catch (Exception ex) { throw ex; } }
public DynamicSqlRow(System.Data.IDataReader reader) { this.reader = reader; }
private AccesscounterInfo getDataReader(iSqlDataReader dar) { try { int i = -1; AccesscounterInfo info = new AccesscounterInfo(); info.Name = dar.IsDBNull(++i) ? "" : dar.GetString(i); info.Counter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); return info; } catch (Exception ex) { throw ex; } }
/// <summary> /// 处理数据库中读取到的日数据。 /// </summary> /// <param name="device">该数据相关的设备。</param> /// <param name="dr">记录集。</param> /// <returns></returns> protected abstract V DoDataReader(Device device, System.Data.IDataReader dr);
private FeedbackInfo getDataReader(iSqlDataReader dar) { try { int i = -1; FeedbackInfo info = new FeedbackInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Address = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Email = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Phone = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Pis = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Pid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Depth = dar.IsDBNull(++i) ? 1 : dar.GetInt32(i); info.Viewcounter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public static EntityUsuarioPaginacion CreatePag(System.Data.IDataReader reader) { throw new NotImplementedException(); }
private GeneralInfo getDataReader_search(iSqlDataReader dar) { try { int i = -1; GeneralInfo info = new GeneralInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Introduce = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Filepreview = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public VolumePatch(System.Data.IDataReader rd) { m_reader = rd; HasMore = true; }
/// <summary> /// 搜索指定页数的日数据。 /// </summary> /// <param name="pageNum">搜索第几页的数据。</param> /// <returns></returns> public IList <V> Search(int pageNum) { List <V> lstValues = new List <V>(); this.PageNum = pageNum; this.RecordsetCount = 0; this.PageCount = 0; Database.DbConnection dbConn = this.Application.GetDbConnection(); if (dbConn == null) { throw new Exception("当前系统未配置数据库连接,无法使用搜索功能。"); } try { if (dbConn.TableIsExist(this.GetDataTableName())) { string strWhere = Tables.Device.TableName + "." + Tables.Device.DeviceId + "=" + this.GetDataTableName() + ".DeviceId"; if (this.StartDate == this.EndDate) { strWhere += " AND " + this.GetDataTableName() + ".DateNum=" + Function.ToIntDate(this.StartDate); } else { strWhere += " AND " + this.GetDataTableName() + ".DateNum>=" + Function.ToIntDate(this.StartDate) + " AND " + this.GetDataTableName() + ".DateNum<=" + Function.ToIntDate(this.EndDate); } strWhere += this.GetSqlWhere(); if (this.Filters.Count > 0) { string strFilterWhere = this.Filters.GetFilterSql(true); if (strFilterWhere != null && strFilterWhere.Length > 0) { strWhere += " AND (" + strFilterWhere + ")"; } } if (strWhere.Length > 0) { strWhere = " WHERE " + strWhere; } string strTableNames = ""; if (this.m_TableNames != null && this.m_TableNames.Length > 0) { foreach (string name in this.m_TableNames) { strTableNames += "," + name; } } string strSql; // 查询结果记录集总数。 strSql = "SELECT COUNT(" + this.GetDataTableName() + ".DeviceId) FROM " + Tables.Device.TableName + strTableNames + "," + this.GetDataTableName() + strWhere; this.RecordsetCount = Function.ToInt(dbConn.ExecuteScalar(strSql)); // 计算总页数并检查当前页是否在页数范围内。 if (this.RecordsetCount == 0) { this.PageCount = 0; this.PageNum = 0; } else { if (this.PageSize > 0) { this.PageCount = this.RecordsetCount / this.PageSize; if ((this.RecordsetCount % this.PageSize) > 0) { this.PageCount++; } if (this.PageNum < 1) { this.PageNum = 1; } if (this.PageNum > this.PageCount) { this.PageNum = this.PageCount; } } else { this.PageNum = 1; this.PageCount = 1; } System.Data.IDataReader dr = null; if (this.PageCount == 1) { strSql = "SELECT " + this.GetSelectColumn() + " FROM " + Tables.Device.TableName + strTableNames + "," + this.GetDataTableName() + strWhere + this.GetOrder(true, this.IsAscend ? false : true); dr = dbConn.ExecuteReader(strSql); } else if (this.PageCount > 1) { if (this.PageNum == 1) { dr = dbConn.GetDataReader(this.PageSize, this.GetSelectColumn(), Tables.Device.TableName + strTableNames + "," + this.GetDataTableName(), strWhere, this.GetOrder(true, this.IsAscend ? false : true)); } else if (this.PageNum == this.PageCount) { dr = dbConn.GetDataReader(this.PageSize, this.RecordsetCount, this.GetSelectColumn(), Tables.Device.TableName + strTableNames + "," + this.GetDataTableName(), strWhere, this.GetOrder(true, this.IsAscend ? true : false), this.GetOrder(false, this.IsAscend ? false : true)); } else { dr = dbConn.GetDataReader(this.PageSize, this.PageNum, this.GetSelectColumn(), Tables.Device.TableName + strTableNames + "," + this.GetDataTableName(), strWhere, this.GetOrder(true, this.IsAscend ? false : true), this.GetOrder(false, this.IsAscend ? true : false), this.GetOrder(false, this.IsAscend ? false : true)); } } if (dr != null) { DeviceCollection devices = new DeviceCollection(true); while (dr.Read()) { int intDeviceId = Function.ToInt(dr[Tables.Device.DeviceId]); Device device = this.Application.GetDeviceInstance(intDeviceId); if (device != null) { device.SetDataReader(dr); } else { DeviceType deviceType = this.Application.DeviceTypeSort.GetDeviceType(Function.ToString(dr[Tables.Device.DeviceType])); if (deviceType != null) { device = deviceType.CreateDevice(); device.SetApplication(this.Application); device.SetDataReader(dr); this.Application.SetDeviceInstance(device); } } if (device != null) { devices.Add(device); lstValues.Add(this.DoDataReader(device, dr)); } } dr.Close(); } } } else { this.RecordsetCount = 0; this.PageCount = 0; this.PageNum = 0; } } catch (Exception ex) { throw ex; } finally { dbConn.Close(); } return(lstValues); }
public FlightInfo(System.Data.IDataReader dr) { this.FlightInfoID = Convert.ToInt32(dr["FlightInfoID"]); this.FlightNo = Convert.ToString(dr["FlightNo"]); }
public PatchBlock(System.Data.IDataReader rd) { m_reader = rd; }
public DBReader(System.Data.IDataReader reader) { this.reader = reader; }
public DynamicTypeAutoMapper(System.Data.IDataReader reader) { _reader = reader; _fields = DataReaderHelper.GetDataReaderFields(_reader); }
public override object Read(int index, System.Data.IDataReader resultSet) /* throws System.Exception */ { return(null); }
private MenuInfo getDataReader(iSqlDataReader dar) { try { int i = -1; MenuInfo info = new MenuInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Navigateurl = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Tooltip = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Attributes = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.ApplyAttributesChild = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Visible = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Pis = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Pid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Depth = dar.IsDBNull(++i) ? 1 : dar.GetInt32(i); info.Cataloguetypeofid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Catalogueid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Insertcatalogue = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Noroot = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
private static PreviousEmployees ORM_CreateProxy(OpenNETCF.ORM.FieldAttributeCollection fields, System.Data.IDataReader results) { var item = new PreviousEmployees(); foreach (var field in fields) { var value = results[field.Ordinal]; switch (field.FieldName) { case "EmployeeID": // If this is a TimeSpan, use the commented line below // item.EmployeeID = (value == DBNull.Value) ? TimeSpan.MinValue; : new TimeSpan((long)value); item.EmployeeID = (value == DBNull.Value) ? 0 : (long)value; break; case "LastName": item.LastName = (value == DBNull.Value) ? null : (string)value; break; case "FirstName": item.FirstName = (value == DBNull.Value) ? null : (string)value; break; case "Title": item.Title = (value == DBNull.Value) ? null : (string)value; break; case "TitleOfCourtesy": item.TitleOfCourtesy = (value == DBNull.Value) ? null : (string)value; break; case "BirthDate": item.BirthDate = (value == DBNull.Value) ? null : (DateTime?)value; break; case "HireDate": item.HireDate = (value == DBNull.Value) ? null : (DateTime?)value; break; case "Address": item.Address = (value == DBNull.Value) ? null : (string)value; break; case "City": item.City = (value == DBNull.Value) ? null : (string)value; break; case "Region": item.Region = (value == DBNull.Value) ? null : (string)value; break; case "PostalCode": item.PostalCode = (value == DBNull.Value) ? null : (string)value; break; case "Country": item.Country = (value == DBNull.Value) ? null : (string)value; break; case "HomePhone": item.HomePhone = (value == DBNull.Value) ? null : (string)value; break; case "Extension": item.Extension = (value == DBNull.Value) ? null : (string)value; break; case "Photo": item.Photo = (value == DBNull.Value) ? null : (byte[])value; break; case "Notes": item.Notes = (value == DBNull.Value) ? null : (string)value; break; case "PhotoPath": item.PhotoPath = (value == DBNull.Value) ? null : (string)value; break; } } return(item); }
private CartInfo getDataReader(iSqlDataReader dar) { try { int i = -1; CartInfo info = new CartInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Timecomplete = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Lang = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Memberid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Membername = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Paymenttype = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Amount = dar.IsDBNull(++i) ? 0 : Math.Round(dar.GetFloat(i)); info.Shippingfee = dar.IsDBNull(++i) ? 0 : Math.Round(dar.GetFloat(i)); info.Discountfee = dar.IsDBNull(++i) ? 0 : Math.Round(dar.GetFloat(i)); info.Couponcode = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Checkout = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Address = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Address2 = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_City = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_District = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Nationalid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Shipping_Zipcode = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Phone = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Email = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Shipping_Nationalname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Address = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Address2 = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_City = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_District = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Nationalid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Billing_Zipcode = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Phone = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Email = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Billing_Nationalname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
internal static Message getMessageFromReader(System.Data.IDataReader rdr) { return(getMessageFromReader(rdr, mdo.dao.oracle.mhv.sm.QueryUtils.getColumnExistsTable(gov.va.medora.mdo.dao.oracle.mhv.sm.TableSchemas.SECURE_MESSAGE_COLUMNS, rdr))); }
private RSSResourceInfo getDataReader(iSqlDataReader dar) { try { int i = -1; RSSResourceInfo info = new RSSResourceInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.WebsiteUrl = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.RSSUrl = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timelastestget = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Nodecontent = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Nodetitle = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Nodeintroduce = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Cname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
internal static Message getMessageFromReader(System.Data.IDataReader rdr, Dictionary <string, bool> columnTable) { Message msg = new Message(); if (columnTable["SECURE_MESSAGE_ID"]) { msg.Id = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("SECURE_MESSAGE_ID"))); } if (columnTable["CLINICIAN_STATUS"]) { msg.Status = (domain.sm.enums.ClinicianStatusEnum)Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("CLINICIAN_STATUS"))); } if (columnTable["COMPLETED_DATE"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("COMPLETED_DATE"))) { msg.CompletedDate = rdr.GetDateTime(rdr.GetOrdinal("COMPLETED_DATE")); } } if (columnTable["ASSIGNED_TO"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("ASSIGNED_TO"))) { if (msg.AssignedTo == null) { msg.AssignedTo = new Clinician(); } msg.AssignedTo.Id = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("ASSIGNED_TO"))); } } if (columnTable["CHECKSUM"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("CHECKSUM"))) { msg.Checksum = rdr.GetString(rdr.GetOrdinal("CHECKSUM")); } } if (columnTable["THREAD_ID"]) { if (msg.MessageThread == null) { msg.MessageThread = new Thread(); } msg.MessageThread.Id = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("THREAD_ID"))); } if (columnTable["STATUS_SET_BY"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("STATUS_SET_BY"))) { if (msg.StatusSetBy == null) { msg.StatusSetBy = new Clinician(); } msg.StatusSetBy.Id = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("STATUS_SET_BY"))); } } if (columnTable["SMOPLOCK"]) { msg.Oplock = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("SMOPLOCK"))); } if (columnTable["ESCALATED"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("ESCALATED"))) { msg.EscalatedDate = rdr.GetDateTime(rdr.GetOrdinal("ESCALATED")); } } if (columnTable["BODY"]) { msg.Body = rdr.GetString(rdr.GetOrdinal("BODY")); } if (columnTable["SENT_DATE"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("SENT_DATE"))) { msg.SentDate = rdr.GetDateTime(rdr.GetOrdinal("SENT_DATE")); } } if (columnTable["SENDER_TYPE"]) { msg.SenderType = (domain.sm.enums.ParticipantTypeEnum)Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("SENDER_TYPE"))); } if (columnTable["SENDER_ID"]) { msg.SenderId = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("SENDER_ID"))); } if (columnTable["SENDER_NAME"]) { msg.SenderName = rdr.GetString(rdr.GetOrdinal("SENDER_NAME")); } if (columnTable["RECIPIENT_TYPE"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("RECIPIENT_TYPE"))) { msg.RecipientType = (domain.sm.enums.ParticipantTypeEnum)Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("RECIPIENT_TYPE"))); } } if (columnTable["RECIPIENT_ID"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("RECIPIENT_ID"))) { msg.RecipientId = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("RECIPIENT_ID"))); } } if (columnTable["RECIPIENT_NAME"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("RECIPIENT_NAME"))) { msg.RecipientName = rdr.GetString(rdr.GetOrdinal("RECIPIENT_NAME")); } } if (columnTable["SENT_DATE_LOCAL"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("SENT_DATE_LOCAL"))) { msg.SentDateLocal = rdr.GetDateTime(rdr.GetOrdinal("SENT_DATE_LOCAL")); } } if (columnTable["ESCALATION_NOTIFICATION_DATE"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("ESCALATION_NOTIFICATION_DATE"))) { msg.EscalationNotificationDate = rdr.GetDateTime(rdr.GetOrdinal("ESCALATION_NOTIFICATION_DATE")); } } if (columnTable["ESCALATION_NOTIFICATION_TRIES"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("ESCALATION_NOTIFICATION_TRIES"))) { msg.EscalationNotificationTries = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("ESCALATION_NOTIFICATION_TRIES"))); } } if (columnTable["READ_RECEIPT"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("READ_RECEIPT"))) { msg.ReadReceipt = rdr.GetString(rdr.GetOrdinal("READ_RECEIPT")); } } if (columnTable["HAS_ATTACHMENT"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("HAS_ATTACHMENT"))) { msg.Attachment = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("HAS_ATTACHMENT"))) == 1; } } if (columnTable["ATTACHMENT_ID"]) { if (!rdr.IsDBNull(rdr.GetOrdinal("ATTACHMENT_ID"))) { msg.AttachmentId = Convert.ToInt32(rdr.GetDecimal(rdr.GetOrdinal("ATTACHMENT_ID"))); } } return(msg); }
private SymbolInfo getDataReader(iSqlDataReader dar) { try { int i = -1; SymbolInfo info = new SymbolInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Path = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sized = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
/// <summary> /// DataReader映射 /// </summary> public static IEnumerable <T> DataReaderMapTo <T>(this System.Data.IDataReader reader) { Mapper.Initialize(cfg => cfg.CreateMap <System.Data.IDataReader, IEnumerable <T> >()); return(Mapper.Map <System.Data.IDataReader, IEnumerable <T> >(reader)); }
private UserrightInfo getDataReader(iSqlDataReader dar) { try { int i = -1; UserrightInfo info = new UserrightInfo(); info.R_new = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.R_upt = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.R_del = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.R_sys = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); return info; } catch (Exception ex) { throw ex; } }
void CodeFluent.Runtime.ICodeFluentEntity.ReadRecord(System.Data.IDataReader reader) { this.ReadRecord(reader, CodeFluent.Runtime.CodeFluentReloadOptions.Default); }
private CartitemInfo getDataReader(iSqlDataReader dar) { try { int i = -1; CartitemInfo info = new CartitemInfo(); info.CartID = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.ProductID = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Productname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Quantity = dar.IsDBNull(++i) ? -1 : dar.GetInt32(i); info.Amount = dar.IsDBNull(++i) ? 0 : Math.Round(dar.GetFloat(i)); info.TemporaryID = dar.IsDBNull(++i) ? 0 : long.Parse(dar.GetValue(i).ToString()); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); return info; } catch (Exception ex) { throw ex; } }
void CodeFluent.Runtime.ICodeFluentEntity.ReadRecordOnSave(System.Data.IDataReader reader) { this.ReadRecordOnSave(reader); }
private CategoryattrInfo getDataReader(iSqlDataReader dar) { try { int i = -1; CategoryattrInfo info = new CategoryattrInfo(); info.Code = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Url = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Filepreview = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Pis = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Pid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Depth = dar.IsDBNull(++i) ? 1 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
/// <summary> /// </summary> /// <param name="dataReader"></param> /// <returns></returns> public IResultMap ResolveSubMap(System.Data.IDataReader dataReader) { throw new Exception("The method or operation is not implemented."); }
private CommentInfo getDataReader(iSqlDataReader dar) { try { int i = -1; CommentInfo info = new CommentInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Introduce = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Description = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timecreate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Iid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Belongto = dar.IsDBNull(++i) ? 1 : dar.GetInt32(i); info.Viewcounter = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rating = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Sender_Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Address = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Email = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sender_Phone = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public override object Read(int index, System.Data.IDataReader resultSet) /* throws System.Exception */ { // return resultSet.getTimestamp(index); return(null); }
private FileattachInfo getDataReader(iSqlDataReader dar) { try { int i = -1; FileattachInfo info = new FileattachInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Path = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Note = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Subject = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Url = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Sized = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); info.Typed = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Orderd = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Iconex = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Belongto = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Iid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public override void Write(object @object, int i, System.Data.IDataReader updatableResultSet) /* throws System.Exception */ { }
private GeneralInfo getDataReader_com(iSqlDataReader dar) { try { int i = -1; GeneralInfo info = new GeneralInfo(); info.Name = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public LocalFileEntry(System.Data.IDataReader reader) { m_reader = reader; }
private ItemcategoryattrInfo getDataReader(iSqlDataReader dar) { try { int i = -1; ItemcategoryattrInfo info = new ItemcategoryattrInfo(); info.Iid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Categoryid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Belongto = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); return info; } catch (Exception ex) { throw ex; } }
public BlocklistHashEnumerator(BlocklistHashEnumerable parent, System.Data.IDataReader reader) { m_reader = reader; m_parent = parent; }
private MeCreditcardInfo getDataReader(iSqlDataReader dar) { try { int i = -1; MeCreditcardInfo info = new MeCreditcardInfo(); info.Firstname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Lastname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cardnumber = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Cardtype = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Expirationmonth = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Expirationyear = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Address = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.City = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.State = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Zipcode = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Memberid = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Balance = dar.IsDBNull(++i) ? 0 : dar.GetFloat(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); return info; } catch (Exception ex) { throw ex; } }
public BlocklistHashEnumerable(System.Data.IDataReader reader) { m_reader = reader; this.MoreData = true; }
private MemberInfo getDataReader(iSqlDataReader dar) { try { int i = -1; MemberInfo info = new MemberInfo(); info.Username = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Password = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Firstname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Lastname = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Email = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.PIN = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Status = dar.IsDBNull(++i) ? (int)CConstants.State.Status.Waitactive : dar.GetInt32(i); info.Markas = dar.IsDBNull(++i) ? (int)CConstants.State.MarkAs.None : dar.GetInt32(i); info.Timeupdate = dar.IsDBNull(++i) ? new DateTime(0) : dar.GetDateTime(i); info.Logincache = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Loginfirst = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Autosave = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Temporarycode = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Grouptype = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Filepreview = dar.IsDBNull(++i) ? string.Empty : dar.GetString(i); info.Ranking = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Vote = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Ratingweight = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Id = dar.IsDBNull(++i) ? 0 : dar.GetInt32(i); info.Rownumber = dar.IsDBNull(++i) ? 0 : dar.GetInt64(i); info.iProfile = new CMeProfile(LANG).Getinfo(info.Id); return info; } catch (Exception ex) { throw ex; } }
public BlockWithSources(System.Data.IDataReader rd) : base(rd.GetString(0), rd.GetInt64(1)) { m_rd = rd; Done = !m_rd.Read(); }