Exemple #1
0
        private static ClientInfo ClientFromrdr(NullableDataReader rdr)
        {
            ClientInfo info = new ClientInfo();

            info.ClientId         = rdr.GetInt32("ClientID");
            info.ParentId         = rdr.GetInt32("ParentID");
            info.ClientNum        = rdr.GetString("ClientNum");
            info.ClientType       = rdr.GetInt32("ClientType");
            info.ClientName       = rdr.GetString("ClientName");
            info.ShortedForm      = rdr.GetString("ShortedForm");
            info.Area             = rdr.GetInt32("Area");
            info.ClientField      = rdr.GetInt32("ClientField");
            info.ValueLevel       = rdr.GetInt32("ValueLevel");
            info.CreditLevel      = rdr.GetInt32("CreditLevel");
            info.Importance       = rdr.GetInt32("Importance");
            info.ConnectionLevel  = rdr.GetInt32("ConnectionLevel");
            info.GroupId          = rdr.GetInt32("GroupID");
            info.SourceType       = rdr.GetInt32("SourceType");
            info.PhaseType        = rdr.GetInt32("PhaseType");
            info.Remark           = rdr.GetString("Remark");
            info.VisitTimes       = rdr.GetInt32("VisitTimes");
            info.ServiceTimes     = rdr.GetInt32("ServiceTimes");
            info.ComplainTimes    = rdr.GetInt32("ComplainTimes");
            info.LastVisitTime    = rdr.GetDateTime("LastVisitTime");
            info.LastServiceTime  = rdr.GetDateTime("LastServiceTime");
            info.LastComplainTime = rdr.GetDateTime("LastComplainTime");
            info.CreateTime       = rdr.GetDateTime("CreateTime");
            info.UpdateTime       = rdr.GetDateTime("UpdateTime");
            info.Owner            = rdr.GetString("Owner");
            info.Balance          = rdr.GetDecimal("Balance");
            return(info);
        }
        private static QuestionInfo GetInfoByReader(NullableDataReader rdr, bool getAll)
        {
            QuestionInfo info = new QuestionInfo();

            info.Id                 = rdr.GetInt32("ID");
            info.TypeId             = rdr.GetInt32("TypeID");
            info.TypeName           = rdr.GetString("TypeName");
            info.QuestionTitle      = rdr.GetString("QuestionTitle");
            info.QuestionCreateTime = rdr.GetDateTime("QuestionCreateTime");
            info.QuestionCreator    = rdr.GetString("QuestionCreator");
            info.ReplyCreator       = rdr.GetString("ReplyCreator");
            info.ReplyTime          = rdr.GetNullableDateTime("ReplyTime");
            info.Score              = rdr.GetInt32("Score");
            info.IsPublic           = rdr.GetBoolean("IsPublic");
            info.IsReply            = rdr.GetBoolean("IsReply");
            info.IsSolved           = rdr.GetBoolean("IsSolved");
            if (getAll)
            {
                info.AntiVirus       = rdr.GetString("AntiVirus");
                info.ErrorCode       = rdr.GetString("ErrorCode");
                info.ErrorText       = rdr.GetString("ErrorText");
                info.FireWall        = rdr.GetString("FireWall");
                info.IP              = rdr.GetString("IP");
                info.ProductDBType   = rdr.GetString("ProductDBType");
                info.ProductVersion  = rdr.GetString("ProductVersion");
                info.QuestionContent = rdr.GetString("QuestionContent");
                info.SystemType      = rdr.GetString("SystemType");
                info.Url             = rdr.GetString("Url");
                info.LastUpdateTime  = rdr.GetDateTime("LastUpdateTime");
            }
            return(info);
        }
        private static CommentInfo CommentInfoCommonFromDataReader(NullableDataReader dr)
        {
            CommentInfo info = new CommentInfo();

            info.CommentId      = dr.GetInt32("CommentId");
            info.Agree          = dr.GetInt32("Agree");
            info.CommentTitle   = dr.GetString("CommentTitle");
            info.Content        = dr.GetString("Content");
            info.GeneralId      = dr.GetInt32("GeneralId");
            info.IP             = dr.GetString("IP");
            info.IsElite        = dr.GetBoolean("IsElite");
            info.IsPrivate      = dr.GetBoolean("IsPrivate");
            info.Neutral        = dr.GetInt32("Neutral");
            info.Oppose         = dr.GetInt32("Oppose");
            info.Position       = dr.GetInt32("Position");
            info.Reply          = dr.GetString("Reply");
            info.ReplyAdmin     = dr.GetString("ReplyAdmin");
            info.ReplyDateTime  = dr.GetDateTime("ReplyDateTime");
            info.ReplyIsPrivate = dr.GetBoolean("ReplyIsPrivate");
            info.Status         = dr.GetBoolean("Status");
            info.TopicId        = dr.GetInt32("TopicId");
            info.UpdateDateTime = dr.GetDateTime("UpdateDateTime");
            info.UserName       = dr.GetString("UserName");
            info.NodeId         = dr.GetInt32("NodeId");
            info.Score          = dr.GetInt32("Score");
            info.Face           = dr.GetString("Face");
            info.ReplyUserName  = dr.GetString("ReplyUserName");
            return(info);
        }
Exemple #4
0
        private static AuthorInfo AuthorFromrdr(NullableDataReader rdr)
        {
            AuthorInfo info = new AuthorInfo();

            info.Id          = rdr.GetInt32("ID");
            info.UserId      = rdr.GetInt32("UserID");
            info.Type        = rdr.GetString("Type");
            info.Name        = rdr.GetString("Name");
            info.Passed      = rdr.GetBoolean("Passed");
            info.OnTop       = rdr.GetBoolean("onTop");
            info.Elite       = rdr.GetBoolean("IsElite");
            info.Hits        = rdr.GetInt32("Hits");
            info.LastUseTime = rdr.GetDateTime("LastUseTime");
            info.TemplateId  = rdr.GetInt32("TemplateID");
            info.Photo       = rdr.GetString("Photo");
            info.Intro       = rdr.GetString("Intro");
            info.Address     = rdr.GetString("Address");
            info.Tel         = rdr.GetString("Tel");
            info.Fax         = rdr.GetString("Fax");
            info.Mail        = rdr.GetString("Mail");
            info.Email       = rdr.GetString("Email");
            info.ZipCode     = rdr.GetInt32("ZipCode");
            info.HomePage    = rdr.GetString("HomePage");
            info.Imeeting    = rdr.GetString("Im");
            info.Sex         = rdr.GetInt16("Sex");
            info.BirthDay    = rdr.GetDateTime("BirthDay");
            info.Company     = rdr.GetString("Company");
            info.Department  = rdr.GetString("Department");
            return(info);
        }
Exemple #5
0
        private static ContacterInfo ContacterFromrdr(NullableDataReader rdr, int flag)
        {
            ContacterInfo info = new ContacterInfo();

            info.ContacterId          = rdr.GetInt32("ContacterID");
            info.ClientId             = rdr.GetInt32("ClientID");
            info.UserName             = rdr.GetString("UserName");
            info.ParentId             = rdr.GetInt32("ParentID");
            info.UserType             = (ContacterType)rdr.GetInt32("UserType");
            info.TrueName             = rdr.GetString("TrueName");
            info.Sex                  = (UserSexType)rdr.GetInt32("Sex");
            info.Title                = rdr.GetString("Title");
            info.Company              = rdr.GetString("Company");
            info.Department           = rdr.GetString("Department");
            info.Position             = rdr.GetString("Position");
            info.Operation            = rdr.GetString("Operation");
            info.CompanyAddress       = rdr.GetString("CompanyAddress");
            info.Email                = rdr.GetString("Email");
            info.Homepage             = rdr.GetString("Homepage");
            info.QQ                   = rdr.GetString("QQ");
            info.Icq                  = rdr.GetString("ICQ");
            info.Msn                  = rdr.GetString("MSN");
            info.Yahoo                = rdr.GetString("Yahoo");
            info.UC                   = rdr.GetString("UC");
            info.Aim                  = rdr.GetString("Aim");
            info.OfficePhone          = rdr.GetString("OfficePhone");
            info.HomePhone            = rdr.GetString("HomePhone");
            info.Phs                  = rdr.GetString("PHS");
            info.Fax                  = rdr.GetString("Fax");
            info.Mobile               = rdr.GetString("Mobile");
            info.Country              = rdr.GetString("Country");
            info.Province             = rdr.GetString("Province");
            info.City                 = rdr.GetString("City");
            info.Address              = rdr.GetString("Address");
            info.ZipCode              = rdr.GetString("ZipCode");
            info.NativePlace          = rdr.GetString("NativePlace");
            info.Nation               = rdr.GetString("Nation");
            info.Birthday             = rdr.GetNullableDateTime("Birthday");
            info.IdCard               = rdr.GetString("IDCard");
            info.Marriage             = (UserMarriageType)rdr.GetInt32("Marriage");
            info.Family               = rdr.GetString("Family");
            info.Income               = rdr.GetInt32("Income");
            info.Education            = rdr.GetInt32("Education");
            info.GraduateFrom         = rdr.GetString("GraduateFrom");
            info.InterestsOfLife      = rdr.GetString("InterestsOfLife");
            info.InterestsOfCulture   = rdr.GetString("InterestsOfCulture");
            info.InterestsOfAmusement = rdr.GetString("InterestsOfAmusement");
            info.InterestsOfSport     = rdr.GetString("InterestsOfSport");
            info.InterestsOfOther     = rdr.GetString("InterestsOfOther");
            info.CreateTime           = rdr.GetDateTime("CreateTime");
            info.UpdateTime           = rdr.GetDateTime("UpdateTime");
            info.Owner                = rdr.GetString("Owner");
            if (flag == 1)
            {
                info.ShortedForm = rdr.GetString("ShortedForm");
            }
            return(info);
        }
Exemple #6
0
        private static UserInfo UsersFromrdr(NullableDataReader rdr)
        {
            UserInfo info = new UserInfo();

            info.UserId                              = rdr.GetInt32("UserID");
            info.GroupId                             = rdr.GetInt32("GroupID");
            info.CompanyId                           = rdr.GetInt32("CompanyID");
            info.ClientId                            = rdr.GetInt32("ClientID");
            info.UserType                            = (UserType)rdr.GetInt32("UserType");
            info.UserName                            = rdr.GetString("UserName");
            info.UserPassword                        = rdr.GetString("UserPassword");
            info.LastPassword                        = rdr.GetString("LastPassword");
            info.PayPassword                         = rdr.GetString("PayPassword");
            info.Question                            = rdr.GetString("Question");
            info.Answer                              = rdr.GetString("Answer");
            info.Email                               = rdr.GetString("Email");
            info.Sex                                 = (UserSexType)rdr.GetInt32("Sex");
            info.RegTime                             = rdr.GetDateTime("RegTime");
            info.JoinTime                            = rdr.GetDateTime("JoinTime");
            info.LogOnTimes                          = rdr.GetInt32("LoginTimes");
            info.LastLogOnTime                       = rdr.GetNullableDateTime("LastLoginTime");
            info.LastPresentTime                     = rdr.GetNullableDateTime("LastPresentTime");
            info.LastLogOnIP                         = rdr.GetString("LastLoginIP");
            info.LastPasswordChangedTime             = rdr.GetNullableDateTime("LastPasswordChangedTime");
            info.LastLockoutTime                     = rdr.GetNullableDateTime("LastLockoutTime");
            info.FailedPasswordAttemptCount          = rdr.GetInt32("FailedPasswordAttemptCount");
            info.FirstFailedPasswordAttempTime       = rdr.GetNullableDateTime("FirstFailedPasswordAttempTime");
            info.FailedPasswordAnswerAttempCount     = rdr.GetInt32("FailedPasswordAnswerAttempCount");
            info.FirstFailedPasswordAnswerAttempTime = rdr.GetNullableDateTime("FirstFailedPasswordAnswerAttempTime");
            info.Status                              = (UserStatus)rdr.GetInt32("Status");
            info.CheckNum                            = rdr.GetString("CheckNum");
            info.EnableResetPassword                 = rdr.GetBoolean("EnableResetPassword");
            info.UserFace                            = rdr.GetString("UserFace");
            info.FaceWidth                           = rdr.GetInt32("FaceWidth");
            info.FaceHeight                          = rdr.GetInt32("FaceHeight");
            info.Sign                                = rdr.GetString("Sign");
            info.PrivacySetting                      = rdr.GetInt32("PrivacySetting");
            info.Balance                             = rdr.GetDecimal("Balance");
            info.UserPoint                           = rdr.GetInt32("UserPoint");
            info.UserExp                             = rdr.GetInt32("UserExp");
            info.ConsumeMoney                        = rdr.GetInt32("ConsumeMoney");
            info.ConsumePoint                        = rdr.GetInt32("ConsumePoint");
            info.ConsumeExp                          = rdr.GetInt32("ConsumeExp");
            info.PostItems                           = rdr.GetInt32("PostItems");
            info.PassedItems                         = rdr.GetInt32("PassedItems");
            info.RejectItems                         = rdr.GetInt32("RejectItems");
            info.DelItems                            = rdr.GetInt32("DelItems");
            info.EndTime                             = rdr.GetNullableDateTime("EndTime");
            info.IsInheritGroupRole                  = rdr.GetBoolean("IsInheritGroupRole");
            info.UserSetting                         = rdr.GetString("UserSetting");
            info.UserFriendGroup                     = rdr.GetString("UserFriendGroup");
            info.UserTrueName                        = rdr.GetString("TrueName");
            return(info);
        }
        private static StatOnlineInfo StatOnlineInfoFromrdr(NullableDataReader rdr)
        {
            StatOnlineInfo info = new StatOnlineInfo();

            info.Id        = rdr.GetInt32("id");
            info.UserIP    = rdr.GetString("UserIP");
            info.UserPage  = rdr.GetString("UserPage");
            info.UserAgent = rdr.GetString("UserAgent");
            info.OnTime    = rdr.GetDateTime("OnTime");
            info.LastTime  = rdr.GetDateTime("LastTime");
            return(info);
        }
        private static OrderFeedbackInfo GetOrderFeedbackInfoFromrdr(NullableDataReader rdr)
        {
            OrderFeedbackInfo info = new OrderFeedbackInfo();

            info.Id           = rdr.GetInt32("ID");
            info.OrderId      = rdr.GetInt32("OrderID");
            info.UserName     = rdr.GetString("UserName");
            info.Content      = rdr.GetString("Content");
            info.WriteTime    = rdr.GetDateTime("WriteTime");
            info.ReplyName    = rdr.GetString("ReplyName");
            info.ReplyContent = rdr.GetString("ReplyContent");
            info.ReplyTime    = rdr.GetDateTime("ReplyTime");
            return(info);
        }
Exemple #9
0
        public DataTable GetBillOfAgent(int startRowIndexId, int maxNumberRows, string userName)
        {
            Database  database          = DatabaseFactory.CreateDatabase();
            DbCommand storedProcCommand = database.GetStoredProcCommand("PR_Accessories_BankroolItem_GetBill");

            database.AddInParameter(storedProcCommand, "@StartRows", DbType.Int32, startRowIndexId);
            database.AddInParameter(storedProcCommand, "@PageSize", DbType.Int32, maxNumberRows);
            database.AddInParameter(storedProcCommand, "@SortColumn", DbType.String, "B.OrderID");
            database.AddInParameter(storedProcCommand, "@StrColumn", DbType.String, "Max(O.OrderNum) AS tOrderNum, SUM(B.Money) AS tMoney, Max(B.DateAndTime) AS tDateAndTime, Max(B.Remark) AS tRemark");
            database.AddInParameter(storedProcCommand, "@Sorts", DbType.String, "DESC");
            database.AddInParameter(storedProcCommand, "@Filter", DbType.String, "B.UserName = '******' AND B.Status=1 ");
            database.AddInParameter(storedProcCommand, "@TableName", DbType.String, "PE_BankrollItem B LEFT JOIN PE_Orders O On B.OrderID = O.OrderID");
            database.AddOutParameter(storedProcCommand, "@Total", DbType.Int32, maxNumberRows);
            DataTable table = new DataTable();

            table.Columns.Add("DateAndTime", typeof(DateTime));
            table.Columns.Add("OrderNum", typeof(string));
            table.Columns.Add("Money", typeof(decimal));
            table.Columns.Add("Remark", typeof(string));
            using (NullableDataReader reader = new NullableDataReader(database.ExecuteReader(storedProcCommand)))
            {
                while (reader.Read())
                {
                    DataRow row = table.NewRow();
                    row["DateAndTime"] = reader.GetDateTime("tDateAndTime");
                    row["OrderNum"]    = reader.GetString("tOrderNum");
                    row["Money"]       = reader.GetDecimal("tMoney");
                    row["Remark"]      = reader.GetString("tRemark");
                    table.Rows.Add(row);
                }
            }
            this.m_TotalOfBill = (int)database.GetParameterValue(storedProcCommand, "@Total");
            return(table);
        }
Exemple #10
0
        public IList <ProductDetailInfo> GetProductsListByUserName(int startRowIndexId, int maxNumberRows, string userName)
        {
            Database  database          = DatabaseFactory.CreateDatabase();
            DbCommand storedProcCommand = database.GetStoredProcCommand("PR_Common_GetList");

            database.AddInParameter(storedProcCommand, "@StartRows", DbType.Int32, startRowIndexId);
            database.AddInParameter(storedProcCommand, "@PageSize", DbType.Int32, maxNumberRows);
            database.AddInParameter(storedProcCommand, "@SortColumn", DbType.String, "M.GeneralId");
            database.AddInParameter(storedProcCommand, "@StrColumn", DbType.String, "N.NodeName, M.EliteLevel, M.CreateTime, M.UpdateTime, M.NodeId, M.GeneralId, M.ModelId, M.LinkType, P.*");
            database.AddInParameter(storedProcCommand, "@Sorts", DbType.String, "DESC");
            database.AddInParameter(storedProcCommand, "@TableName", DbType.String, "PE_CommonProduct P INNER JOIN (PE_CommonModel M RIGHT JOIN PE_Nodes N ON M.NodeID= N.NodeID) ON P.ProductID = M.ItemID AND P.TableName = M.TableName AND M.Status<>-3");
            database.AddInParameter(storedProcCommand, "@Filter", DbType.String, "M.Inputer = '" + DBHelper.FilterBadChar(userName) + "'");
            database.AddOutParameter(storedProcCommand, "@Total", DbType.Int32, maxNumberRows);
            IList <ProductDetailInfo> list = new List <ProductDetailInfo>();

            using (NullableDataReader reader = new NullableDataReader(database.ExecuteReader(storedProcCommand)))
            {
                while (reader.Read())
                {
                    ProductDetailInfo productInfo = new ProductDetailInfo();
                    ProductFromrdr <ProductDetailInfo>(reader, productInfo);
                    productInfo.EliteLevel = reader.GetInt32("EliteLevel");
                    productInfo.UpdateTime = new DateTime?(reader.GetDateTime("UpdateTime"));
                    productInfo.CreateTime = reader.IsDBNull("CreateTime") ? productInfo.UpdateTime : new DateTime?(reader.GetDateTime("CreateTime"));
                    productInfo.NodeName   = reader.GetString("NodeName");
                    productInfo.NodeId     = reader.GetInt32("NodeId");
                    productInfo.GeneralId  = reader.GetInt32("GeneralId");
                    productInfo.ModelId    = reader.GetInt32("ModelId");
                    productInfo.LinkType   = reader.GetInt32("LinkType");
                    list.Add(productInfo);
                }
            }
            this.m_TotalOfProducts = (int)database.GetParameterValue(storedProcCommand, "@Total");
            return(list);
        }
        private static AdvertisementInfo AdvertisementFromrdr(NullableDataReader rdr)
        {
            AdvertisementInfo info = new AdvertisementInfo();

            info.ADId        = rdr.GetInt32("ADID");
            info.UserId      = rdr.GetInt32("UserID");
            info.ADType      = rdr.GetInt32("ADType");
            info.ADName      = rdr.GetString("ADName");
            info.ImgUrl      = rdr.GetString("ImgUrl");
            info.ImgWidth    = rdr.GetInt32("ImgWidth");
            info.ImgHeight   = rdr.GetInt32("ImgHeight");
            info.FlashWmode  = rdr.GetInt32("FlashWmode");
            info.ADIntro     = rdr.GetString("ADIntro");
            info.LinkUrl     = rdr.GetString("LinkUrl");
            info.LinkTarget  = rdr.GetInt32("LinkTarget");
            info.LinkAlt     = rdr.GetString("LinkAlt");
            info.Priority    = rdr.GetInt32("Priority");
            info.Setting     = rdr.GetString("Setting");
            info.CountView   = rdr.GetBoolean("CountView");
            info.Views       = rdr.GetInt32("Views");
            info.CountClick  = rdr.GetBoolean("CountClick");
            info.Clicks      = rdr.GetInt32("Clicks");
            info.Passed      = rdr.GetBoolean("Passed");
            info.OverdueDate = rdr.GetDateTime("OverdueDate");
            return(info);
        }
Exemple #12
0
        public ProductDetailInfo GetProductDetailInfoById(int id)
        {
            Parameters cmdParams = new Parameters();

            cmdParams.AddInParameter("@ID", DbType.Int32, id);
            string strSql = "SELECT N.NodeName, M.EliteLevel, M.CreateTime, M.UpdateTime, M.NodeId, M.GeneralId, M.ModelId, M.LinkType, P.* \r\n                           FROM PE_CommonProduct P INNER JOIN (PE_CommonModel M RIGHT JOIN PE_Nodes N ON M.NodeID= N.NodeID) \r\n                                ON P.ProductID = M.ItemID WHERE M.GeneralID=@ID";

            using (NullableDataReader reader = DBHelper.ExecuteReaderSql(strSql, cmdParams))
            {
                if (reader.Read())
                {
                    ProductDetailInfo productInfo = new ProductDetailInfo();
                    ProductFromrdr <ProductDetailInfo>(reader, productInfo);
                    productInfo.EliteLevel = reader.GetInt32("EliteLevel");
                    productInfo.UpdateTime = new DateTime?(reader.GetDateTime("UpdateTime"));
                    productInfo.CreateTime = reader.GetNullableDateTime("CreateTime");
                    productInfo.NodeName   = reader.GetString("NodeName");
                    productInfo.NodeId     = reader.GetInt32("NodeId");
                    productInfo.GeneralId  = reader.GetInt32("GeneralId");
                    productInfo.ModelId    = reader.GetInt32("ModelId");
                    productInfo.LinkType   = reader.GetInt32("LinkType");
                    return(productInfo);
                }
                return(new ProductDetailInfo());
            }
        }
        private static OrderItemInfo OrderItemFromrdr(NullableDataReader rdr)
        {
            OrderItemInfo info = new OrderItemInfo();

            info.ItemId           = rdr.GetInt32("ItemID");
            info.OrderId          = rdr.GetInt32("OrderID");
            info.ProductId        = rdr.GetInt32("ProductID");
            info.TableName        = rdr.GetString("TableName");
            info.Property         = rdr.GetString("Property");
            info.SaleType         = rdr.GetInt32("SaleType");
            info.PriceMarket      = rdr.GetDecimal("Price_Market");
            info.Price            = rdr.GetDecimal("Price");
            info.TruePrice        = rdr.GetDecimal("TruePrice");
            info.Amount           = rdr.GetInt32("Amount");
            info.SubTotal         = rdr.GetDecimal("SubTotal");
            info.BeginDate        = rdr.GetDateTime("BeginDate");
            info.ServiceTerm      = rdr.GetInt32("ServiceTerm");
            info.Remark           = rdr.GetString("Remark");
            info.PresentMoney     = rdr.GetDecimal("PresentMoney");
            info.PresentPoint     = rdr.GetInt32("PresentPoint");
            info.PresentExp       = rdr.GetInt32("PresentExp");
            info.ServiceTermUnit  = (ServiceTermUnit)rdr.GetInt32("ServiceTermUnit");
            info.ProductCharacter = (ProductCharacter)rdr.GetInt32("ProductCharacter");
            info.ProductName      = rdr.GetString("ProductName");
            info.Unit             = rdr.GetString("Unit");
            info.Weight           = rdr.GetDouble("Weight");
            return(info);
        }
        private static ComplainItemInfo ComplainFromDataReader(NullableDataReader rdr)
        {
            ComplainItemInfo info = new ComplainItemInfo();

            info.ItemId              = rdr.GetInt32("ItemID");
            info.ClientId            = rdr.GetInt32("ClientID");
            info.ContacterId         = rdr.GetInt32("ContacterID");
            info.ComplainMode        = rdr.GetInt32("ComplainMode");
            info.ComplainType        = rdr.GetInt32("ComplainType");
            info.ConfirmCaller       = rdr.GetString("ConfirmCaller");
            info.ConfirmFeedback     = rdr.GetString("ConfirmFeedback");
            info.ConfirmScore        = rdr.GetInt32("ConfirmScore");
            info.ConfirmTime         = rdr.GetNullableDateTime("ConfirmTime");
            info.Content             = rdr.GetString("Content");
            info.CurrentOwner        = rdr.GetString("CurrentOwner");
            info.DateAndTime         = rdr.GetDateTime("DateAndTime");
            info.EndTime             = rdr.GetNullableDateTime("EndTime");
            info.Feedback            = rdr.GetString("Feedback");
            info.FirstReceiver       = rdr.GetString("FirstReceiver");
            info.MagnitudeOfExigence = rdr.GetInt32("MagnitudeOfExigence");
            info.Process             = rdr.GetString("Process");
            info.Processor           = rdr.GetString("Processor");
            info.Remark              = rdr.GetString("Remark");
            info.Result              = rdr.GetString("Result");
            info.ShortedForm         = rdr.GetString("ShortedForm");
            info.Status              = rdr.GetInt32("Status");
            info.Title     = rdr.GetString("Title");
            info.Defendant = rdr.GetString("Defendant");
            return(info);
        }
Exemple #15
0
        private static ServiceInfo ServiceFromrdr(NullableDataReader rdr)
        {
            ServiceInfo info = new ServiceInfo();

            info.ItemId          = rdr.GetInt32("ItemId");
            info.ClientId        = rdr.GetInt32("ClientId");
            info.ContacterId     = rdr.GetInt32("ContacterId");
            info.OrderId         = rdr.GetInt32("OrderId");
            info.ServiceTime     = rdr.GetDateTime("ServiceTime");
            info.ServiceType     = rdr.GetString("ServiceType");
            info.ServiceMode     = rdr.GetString("ServiceMode");
            info.ServiceTitle    = rdr.GetString("ServiceTitle");
            info.ServiceContent  = rdr.GetString("ServiceContent");
            info.ServiceResult   = rdr.GetInt32("ServiceResult");
            info.TakeTime        = rdr.GetInt32("TakeTime");
            info.Processor       = rdr.GetString("Processor");
            info.Inputer         = rdr.GetString("Inputer");
            info.Feedback        = rdr.GetString("Feedback");
            info.ConfirmTime     = rdr.GetNullableDateTime("ConfirmTime");
            info.ConfirmCaller   = rdr.GetString("ConfirmCaller");
            info.ConfirmScore    = rdr.GetInt32("ConfirmScore");
            info.ConfirmFeedback = rdr.GetString("ConfirmFeedback");
            info.Remark          = rdr.GetString("Remark");
            info.ClientName      = rdr.GetString("ClientName");
            info.ShortedForm     = rdr.GetString("ShortedForm");
            return(info);
        }
Exemple #16
0
 private void Fill(out SolicitudesEFechasSolicitud oObj, NullableDataReader dr)
 {
     oObj = new SolicitudesEFechasSolicitud(
         dr.GetInt64("id_Beneficiario")
         , dr.GetInt16("codPrestacion")
         , dr.GetString("ApeNomCompleto")
         , dr.GetNullableString("cuip") == null ? "" : dr.GetString("cuip")
         , dr.GetString("DescripcionPrestacion")
         , dr.GetInt16("pais_PK")
         , dr.GetString("PaisDescCompleto")
         , dr.GetBoolean("Mercosur")
         , dr.GetString("referencia_exterior")
         , dr.GetString("ubicacion_Fisica")
         , dr.GetDateTime("fAMSolicitud")
         , dr.GetDateTime("fechaIngreso")
         );
 }
Exemple #17
0
        private static OrderInfo OrderFromrdr(NullableDataReader rdr, string action)
        {
            OrderInfo info = new OrderInfo();

            info.OrderId       = rdr.GetInt32("OrderID");
            info.OrderNum      = rdr.GetString("OrderNum");
            info.UserName      = rdr.GetString("UserName");
            info.ClientId      = rdr.GetInt32("ClientID");
            info.ClientName    = rdr.GetString("ClientName");
            info.MoneyTotal    = rdr.GetDecimal("MoneyTotal");
            info.NeedInvoice   = rdr.GetBoolean("NeedInvoice");
            info.Invoiced      = rdr.GetBoolean("Invoiced");
            info.Remark        = rdr.GetString("Remark");
            info.MoneyReceipt  = rdr.GetDecimal("MoneyReceipt");
            info.InputTime     = rdr.GetDateTime("InputTime");
            info.Status        = (OrderStatus)rdr.GetInt32("Status");
            info.DeliverStatus = (DeliverStatus)rdr.GetInt32("DeliverStatus");
            if (string.IsNullOrEmpty(action))
            {
                info.EnableDownload  = rdr.GetBoolean("EnableDownload");
                info.PresentMoney    = rdr.GetDecimal("PresentMoney");
                info.PresentPoint    = rdr.GetInt32("PresentPoint");
                info.PresentExp      = rdr.GetInt32("PresentExp");
                info.DiscountPayment = rdr.GetDouble("Discount_Payment");
                info.ChargeDeliver   = rdr.GetDecimal("Charge_Deliver");
            }
            info.AgentName         = rdr.GetString("AgentName");
            info.Functionary       = rdr.GetString("Functionary");
            info.InvoiceContent    = rdr.GetString("InvoiceContent");
            info.BeginDate         = rdr.GetDateTime("BeginDate");
            info.ContacterName     = rdr.GetString("ContacterName");
            info.Address           = rdr.GetString("Address");
            info.ZipCode           = rdr.GetString("ZipCode");
            info.Mobile            = rdr.GetString("Mobile");
            info.Phone             = rdr.GetString("Phone");
            info.Email             = rdr.GetString("Email");
            info.PaymentType       = rdr.GetInt32("PaymentType");
            info.DeliverType       = rdr.GetInt32("DeliverType");
            info.Memo              = rdr.GetString("Memo");
            info.OutOfStockProject = (OutOfStockProject)rdr.GetInt32("OutOfStockProject");
            info.OrderType         = rdr.GetInt32("OrderType");
            info.CouponId          = rdr.GetInt32("CouponID");
            info.DeliveryTime      = rdr.GetString("DeliveryTime");
            return(info);
        }
        private static ShoppingCartInfo ShoppingCartFromrdr(NullableDataReader rdr, bool isDetail)
        {
            ShoppingCartInfo info = new ShoppingCartInfo();

            info.UserName     = rdr.GetString("UserName");
            info.CartId       = rdr.GetString("CartID");
            info.ProductId    = rdr.GetInt32("ProductID");
            info.Quantity     = rdr.GetInt32("Quantity");
            info.IsPresent    = rdr.GetBoolean("IsPresent");
            info.UpdateTime   = rdr.GetDateTime("UpdateTime");
            info.TableName    = rdr.GetString("TableName");
            info.Property     = rdr.GetString("Property");
            info.InformResult = rdr.GetInt32("InformResult");
            if (isDetail)
            {
                info.ProductInfomation.ProductName                = rdr.GetString("ProductName");
                info.ProductInfomation.ProductType                = (ProductType)rdr.GetInt32("ProductType");
                info.ProductInfomation.ProductPic                 = rdr.GetString("ProductPic");
                info.ProductInfomation.ProductThumb               = rdr.GetString("ProductThumb");
                info.ProductInfomation.Unit                       = rdr.GetString("Unit");
                info.ProductInfomation.ServiceTermUnit            = (ServiceTermUnit)rdr.GetInt32("ServiceTermUnit");
                info.ProductInfomation.ServiceTerm                = rdr.GetInt32("ServiceTerm");
                info.ProductInfomation.PriceInfo.Price            = rdr.GetDecimal("Price");
                info.ProductInfomation.PriceMarket                = rdr.GetDecimal("Price_Market");
                info.ProductInfomation.PriceInfo.PriceMember      = rdr.GetDecimal("Price_Member");
                info.ProductInfomation.PriceInfo.PriceAgent       = rdr.GetDecimal("Price_Agent");
                info.ProductInfomation.EnableWholesale            = rdr.GetBoolean("EnableWholesale");
                info.ProductInfomation.PriceInfo.PriceWholesale1  = rdr.GetDecimal("Price_Wholesale1");
                info.ProductInfomation.PriceInfo.PriceWholesale2  = rdr.GetDecimal("Price_Wholesale2");
                info.ProductInfomation.PriceInfo.PriceWholesale3  = rdr.GetDecimal("Price_Wholesale3");
                info.ProductInfomation.PriceInfo.NumberWholesale1 = rdr.GetInt32("Number_Wholesale1");
                info.ProductInfomation.PriceInfo.NumberWholesale2 = rdr.GetInt32("Number_Wholesale2");
                info.ProductInfomation.PriceInfo.NumberWholesale3 = rdr.GetInt32("Number_Wholesale3");
                info.ProductInfomation.PresentId                  = rdr.GetInt32("PresentID");
                info.ProductInfomation.PresentNumber              = rdr.GetInt32("PresentNumber");
                info.ProductInfomation.PresentPoint               = rdr.GetInt32("PresentPoint");
                info.ProductInfomation.PresentExp                 = rdr.GetInt32("PresentExp");
                info.ProductInfomation.PresentMoney               = rdr.GetDecimal("PresentMoney");
                info.ProductInfomation.StocksProject              = (StocksProject)rdr.GetInt32("StocksProject");
                info.ProductInfomation.SalePromotionType          = rdr.GetInt32("SalePromotionType");
                info.ProductInfomation.MinNumber                  = rdr.GetInt32("MinNumber");
                info.ProductInfomation.Discount                   = rdr.GetDouble("Discount");
                info.ProductInfomation.IncludeTax                 = (TaxRateType)rdr.GetInt32("IncludeTax");
                info.ProductInfomation.TaxRate                    = rdr.GetDouble("TaxRate");
                info.ProductInfomation.Properties                 = rdr.GetString("Properties");
                info.ProductInfomation.Weight                     = rdr.GetDouble("Weight");
                info.ProductInfomation.LimitNum                   = rdr.GetInt32("LimitNum");
                info.ProductInfomation.EnableSingleSell           = rdr.GetBoolean("EnableSingleSell");
                info.ProductInfomation.DependentProducts          = rdr.GetString("DependentProducts");
                info.ProductInfomation.ProductKind                = (ProductKind)rdr.GetInt32("ProductKind");
                info.ProductInfomation.TableName                  = rdr.GetString("TableName");
                info.ProductInfomation.ProductId                  = rdr.GetInt32("ProductID");
                info.ProductInfomation.Stocks                     = rdr.GetInt32("Stocks");
                info.ProductInfomation.OrderNum                   = rdr.GetInt32("OrderNum");
            }
            return(info);
        }
        public IList <QuestionInfo> GetQuestonsByUser(string userName, int startRowIndex, int maximumRows, int searchType, string keyword)
        {
            Database  database          = DatabaseFactory.CreateDatabase();
            DbCommand storedProcCommand = database.GetStoredProcCommand("PR_Common_GetListBySortColumn");

            database.AddInParameter(storedProcCommand, "@StartRows", DbType.Int32, startRowIndex);
            database.AddInParameter(storedProcCommand, "@PageSize", DbType.Int32, maximumRows);
            database.AddInParameter(storedProcCommand, "@PrimaryColumn", DbType.String, "ID");
            database.AddInParameter(storedProcCommand, "@SortColumnDbType", DbType.String, "DateTime");
            database.AddInParameter(storedProcCommand, "@SortColumn", DbType.String, "LastUpdateTime");
            database.AddInParameter(storedProcCommand, "@StrColumn", DbType.String, "ID, QuestionTitle, LastUpdateTime, ReplyTime,ReplyCreator, IsReply, IsSolved");
            database.AddInParameter(storedProcCommand, "@Sorts", DbType.String, "DESC");
            database.AddInParameter(storedProcCommand, "@TableName", DbType.String, "PE_Question");
            database.AddInParameter(storedProcCommand, "@Filter", DbType.String);
            database.AddOutParameter(storedProcCommand, "@Total", DbType.Int32, maximumRows);
            string str = " QuestionCreator = '" + DBHelper.FilterBadChar(userName) + "' ";

            switch (searchType)
            {
            case 1:
                str = str + " AND IsReply = 1 AND IsSolved = 0 ";
                storedProcCommand.Parameters["@SortColumn"].Value = "ReplyTime";
                break;

            case 2:
                str = str + " AND IsSolved = 1 ";
                break;

            case 3:
                if (!string.IsNullOrEmpty(keyword))
                {
                    str = str + " AND QuestionTitle LIKE '%" + DBHelper.FilterBadChar(keyword) + "%' ";
                }
                break;
            }
            storedProcCommand.Parameters["@Filter"].Value = str;
            IList <QuestionInfo> list = new List <QuestionInfo>();

            using (NullableDataReader reader = new NullableDataReader(database.ExecuteReader(storedProcCommand)))
            {
                while (reader.Read())
                {
                    QuestionInfo item = new QuestionInfo();
                    item.Id                 = reader.GetInt32("ID");
                    item.QuestionTitle      = reader.GetString("QuestionTitle");
                    item.QuestionCreateTime = reader.GetDateTime("LastUpdateTime");
                    item.ReplyTime          = reader.GetNullableDateTime("ReplyTime");
                    item.IsReply            = reader.GetBoolean("IsReply");
                    item.IsSolved           = reader.GetBoolean("IsSolved");
                    item.ReplyCreator       = reader.GetString("ReplyCreator");
                    list.Add(item);
                }
            }
            this.m_TotalCount = (int)database.GetParameterValue(storedProcCommand, "@Total");
            return(list);
        }
        private static PresentProjectInfo PresentProjectFromrdr(NullableDataReader rdr)
        {
            PresentProjectInfo info = new PresentProjectInfo();

            info.ProjectId      = rdr.GetInt32("ProjectID");
            info.ProjectName    = rdr.GetString("ProjectName");
            info.BeginDate      = rdr.GetDateTime("BeginDate");
            info.EndDate        = rdr.GetDateTime("EndDate");
            info.MinMoney       = rdr.GetDecimal("MinMoney");
            info.MaxMoney       = rdr.GetDecimal("MaxMoney");
            info.PresentContent = rdr.GetString("PresentContent");
            info.Price          = rdr.GetDecimal("Price");
            info.PresentId      = rdr.GetString("PresentID");
            info.Cash           = rdr.GetDecimal("Cash");
            info.PresentExp     = rdr.GetInt32("PresentExp");
            info.PresentPoint   = rdr.GetInt32("PresentPoint");
            info.Disabled       = rdr.GetBoolean("Disabled");
            return(info);
        }
Exemple #21
0
        private void Fill(out Movimiento_Solicitud oObj, NullableDataReader dr)
        {
            Estado iEstado = new Estado(dr.GetInt32("cod_estado"), dr.GetString("descripcionEstado"));
            Sector iSector = new Sector(dr.GetInt32("cod_sector"), dr.GetString("descripcionSector"));

            oObj = new Movimiento_Solicitud(dr.GetDateTime("fecha_Movimiento")
                                            , iEstado
                                            , iSector
                                            , dr.GetNullableString("observaciones") == null ? "":dr.GetString("observaciones")
                                            );
        }
        private static SignInLogInfo SigninLogInfoFromDataReader(NullableDataReader dr)
        {
            SignInLogInfo info = new SignInLogInfo();

            info.GeneralId  = dr.GetInt32("GeneralId");
            info.IP         = dr.GetString("IP");
            info.IsSignIn   = dr.GetBoolean("IsSignin");
            info.SignInTime = dr.GetDateTime("SigninTime");
            info.UserName   = dr.GetString("UserName");
            return(info);
        }
Exemple #23
0
 private void Fill(out Devolucion oObj, NullableDataReader dr)
 {
     oObj = new Devolucion(dr.GetDateTime("fechaMovimiento"),
                           dr.GetNullableString("destino") == null  ? "" : dr.GetString("destino"),
                           dr.GetNullableString("Observaciones") == null?"":dr.GetString("Observaciones"),
                           dr.GetNullableString("Certificado") == null ? "" : dr.GetString("Certificado"),
                           this.TraeFaltanteDevolucionXFechaMovimiento(dr.GetInt64("id_Beneficiario"), dr.GetInt16("codPrestacion"), dr.GetDateTime("fechaMovimiento").ToShortDateString()),
                           dr.GetNullableDateTime("fechaNotificacion"),
                           dr.GetNullableDateTime("fechaPresentacion")
                           );
 }
Exemple #24
0
        public bool ImportData(string zoneId, string importDatabase)
        {
            bool          flag;
            Database      db      = DatabaseFactory.CreateDatabase();
            StringBuilder builder = new StringBuilder("");

            builder.Append(" SELECT ZoneID, ZoneName, ZoneJSName, ZoneIntro, ZoneType, DefaultSetting, ZoneSetting, ZoneWidth, ZoneHeight, ShowType, Active, UpdateTime FROM PE_AdZone ");
            OleDbConnection connection = new OleDbConnection("Provider = Microsoft.Jet.OleDb.4.0;Data Source = " + importDatabase);

            try
            {
                connection.Open();
                builder.Append("Where ZoneID IN (" + zoneId + ") ORDER BY ZoneID");
                OleDbCommand       command = new OleDbCommand(builder.ToString(), connection);
                NullableDataReader reader  = new NullableDataReader(command.ExecuteReader(CommandBehavior.CloseConnection));
                while (reader.Read())
                {
                    ADZoneInfo adZoneInfo = new ADZoneInfo();
                    adZoneInfo.ZoneId         = GetMaxADZoneId();
                    adZoneInfo.ZoneName       = reader.GetString("ZoneName");
                    adZoneInfo.ZoneJSName     = reader.GetString("ZoneJSName");
                    adZoneInfo.ZoneIntro      = reader.GetString("ZoneIntro");
                    adZoneInfo.ZoneType       = (ADZoneType)reader.GetInt32("ZoneType");
                    adZoneInfo.DefaultSetting = reader.GetBoolean("DefaultSetting");
                    adZoneInfo.Setting        = reader.GetString("ZoneSetting");
                    adZoneInfo.ZoneWidth      = reader.GetInt32("ZoneWidth");
                    adZoneInfo.ZoneHeight     = reader.GetInt32("ZoneHeight");
                    adZoneInfo.ShowType       = reader.GetInt32("ShowType");
                    adZoneInfo.Active         = reader.GetBoolean("Active");
                    adZoneInfo.UpdateTime     = reader.GetDateTime("UpdateTime");
                    DbCommand command2 = GetProcdbComm(db, "PR_Ad_ADZone_ADD", adZoneInfo);
                    try
                    {
                        db.ExecuteNonQuery(command2);
                        continue;
                    }
                    catch
                    {
                        reader.Close();
                        return(false);
                    }
                }
                flag = true;
            }
            catch
            {
                flag = false;
            }
            finally
            {
                connection.Close();
            }
            return(flag);
        }
Exemple #25
0
        private static DownloadErrorInfo DownloadErrorInfoFromrdr(NullableDataReader rdr)
        {
            DownloadErrorInfo info = new DownloadErrorInfo();

            info.ErrorId    = rdr.GetInt32("ErrorID");
            info.InfoId     = rdr.GetInt32("InfoID");
            info.ErrorUrl   = rdr.GetString("ErrorUrl");
            info.ErrorTimes = rdr.GetInt32("ErrorTimes");
            info.ErrorDate  = rdr.GetDateTime("ErrorDate");
            return(info);
        }
Exemple #26
0
        private static ReplyInfo GetInfobyReader(NullableDataReader rdr)
        {
            ReplyInfo info = new ReplyInfo();

            info.Id           = rdr.GetInt32("ID");
            info.QuestionId   = rdr.GetInt32("QuestionID");
            info.ReplyCreator = rdr.GetString("ReplyCreator");
            info.ReplyTime    = rdr.GetDateTime("ReplyTime");
            info.ReplyContent = rdr.GetString("ReplyContent");
            return(info);
        }
Exemple #27
0
        private static SignInContentInfo SigninContentInfoFromDataReader(NullableDataReader dr)
        {
            SignInContentInfo info = new SignInContentInfo();

            info.GeneralId  = dr.GetInt32("GeneralId");
            info.EndTime    = dr.GetDateTime("EndTime");
            info.Priority   = dr.GetInt32("Priority");
            info.SignInType = (SignInType)dr.GetInt32("SigninType");
            info.Status     = (SignInStatus)dr.GetInt32("Status");
            info.Title      = dr.GetString("Title");
            return(info);
        }
Exemple #28
0
        private static InvoiceInfo InvoiceItemFromrdr(NullableDataReader rdr)
        {
            InvoiceInfo info = new InvoiceInfo();

            info.InvoiceId      = rdr.GetInt32("InvoiceID");
            info.ClientId       = rdr.GetInt32("ClientID");
            info.UserName       = rdr.GetString("UserName");
            info.OrderId        = rdr.GetInt32("OrderID");
            info.InvoiceType    = rdr.GetInt32("InvoiceType");
            info.InvoiceNum     = rdr.GetString("InvoiceNum");
            info.InvoiceTitle   = rdr.GetString("InvoiceTitle");
            info.InvoiceContent = rdr.GetString("InvoiceContent");
            info.InvoiceDate    = rdr.GetDateTime("InvoiceDate");
            info.TotalMoney     = rdr.GetDecimal("TotalMoney");
            info.Drawer         = rdr.GetString("Drawer");
            info.Inputer        = rdr.GetString("Inputer");
            info.InputTime      = rdr.GetDateTime("InputTime");
            info.OrderNum       = rdr.GetString("OrderNum");
            info.ClientName     = rdr.GetString("ClientName");
            return(info);
        }
Exemple #29
0
        private static CouponInfo GetCouponInfoFromrdataReader(NullableDataReader dataReader)
        {
            CouponInfo info = new CouponInfo();

            info.BeginDate           = dataReader.GetDateTime("BeginDate");
            info.CouponCreateContent = dataReader.GetString("CouponCreateContent");
            info.CouponCreateType    = (CouponCreateType)dataReader.GetInt32("CouponCreateType");
            info.CouponId            = dataReader.GetInt32("CouponId");
            info.CouponName          = dataReader.GetString("CouponName");
            info.EndDate             = dataReader.GetDateTime("EndDate");
            info.LimitNum            = dataReader.GetInt32("LimitNum");
            info.Money               = dataReader.GetDecimal("Money");
            info.OrderTotalMoney     = dataReader.GetDecimal("OrderTotalMoney");
            info.CouponNumPattern    = dataReader.GetString("CouponNumPattern");
            info.ProductLimitContent = dataReader.GetString("ProductLimitContent");
            info.ProductLimitType    = (ProductLimitType)dataReader.GetInt32("ProductLimitType");
            info.State               = dataReader.GetInt32("State");
            info.UserGroup           = dataReader.GetString("UserGroup");
            info.UseEndDate          = dataReader.GetDateTime("UseEndDate");
            return(info);
        }
        private static StockInfo StockFromrdr(NullableDataReader rdr)
        {
            StockInfo info = new StockInfo();

            info.StockId   = rdr.GetInt32("StockID");
            info.StockNum  = rdr.GetString("StockNum");
            info.InputTime = rdr.GetDateTime("InputTime");
            info.Inputer   = rdr.GetString("Inputer");
            info.StockType = (StockType)rdr.GetInt32("StockType");
            info.Remark    = rdr.GetString("Remark");
            return(info);
        }