예제 #1
0
        public bool Load()
        {
            string  sql = string.Format("select * from Purchase where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id               = DBTool.GetIntFromRow(row, "Id", 0);
                m_BranchId         = DBTool.GetIntFromRow(row, "BranchId", 0);
                m_StoreId          = DBTool.GetIntFromRow(row, "StoreId", 0);
                m_SupplierId       = DBTool.GetIntFromRow(row, "SupplierId", 0);
                m_PurchaseType     = DBTool.GetStringFromRow(row, "PurchaseType", "");
                m_SumMoney         = DBTool.GetDoubleFromRow(row, "SumMoney", 0);
                m_PurchaseDate     = DBTool.GetDateTimeFromRow(row, "PurchaseDate");
                m_PurchaseUserId   = DBTool.GetIntFromRow(row, "PurchaseUserId", 0);
                m_IsPaid           = DBTool.GetIntFromRow(row, "IsPaid", 0);
                m_IsTax            = DBTool.GetIntFromRow(row, "IsTax", 0);
                m_IsConfirm        = DBTool.GetIntFromRow(row, "IsConfirm", 0);
                m_IsCashConfirm    = DBTool.GetIntFromRow(row, "IsCashConfirm", 0);
                m_Memo             = DBTool.GetStringFromRow(row, "Memo", "");
                m_UpdateTime       = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                m_UserId           = DBTool.GetIntFromRow(row, "UserId", 0);
                m_PurchaseStatus   = DBTool.GetStringFromRow(row, "PurchaseStatus", "");
                m_NeedToPurchaseId = DBTool.GetIntFromRow(row, "NeedToPurchaseId", 0);
                m_ReceiptUserId    = DBTool.GetIntFromRow(row, "ReceiptUserId", 0);
                m_ConfirmDate      = DBTool.GetDateTimeFromRow(row, "ConfirmDate");
                Tax     = DBTool.GetDoubleFromRow(row, "Tax", 0);
                TaxRate = DBTool.GetDoubleFromRow(row, "TaxRate", 0);

                return(true);
            }
            return(false);
        }
예제 #2
0
        public bool Load(int NeedToPurchaseId, int GoodsId)
        {
            string  sql = string.Format("select * from NeedToPurchaseDetail where NeedToPurchaseId ={0} and GoodsId={1}", NeedToPurchaseId, GoodsId);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id = DBTool.GetIntFromRow(row, "Id", 0);
                m_NeedToPurchaseId = DBTool.GetIntFromRow(row, "NeedToPurchaseId", 0);
                m_GoodsId          = DBTool.GetIntFromRow(row, "GoodsId", 0);
                m_Model            = DBTool.GetStringFromRow(row, "Model", "");
                m_Num          = DBTool.GetIntFromRow(row, "Num", 0);
                m_UserId       = DBTool.GetIntFromRow(row, "UserId", 0);
                m_PurchaseType = DBTool.GetStringFromRow(row, "PurchaseType", "");
                m_PurchaseMemo = DBTool.GetStringFromRow(row, "PurchaseMemo", "");
                m_CreditCard   = DBTool.GetStringFromRow(row, "CreditCard", "");
                m_UpdateTime   = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                m_LackNum      = DBTool.GetIntFromRow(row, "LackNum", 0);
                m_Emergency    = DBTool.GetIntFromRow(row, "Emergency", 0);
                m_GoodsMemo    = DBTool.GetStringFromRow(row, "GoodsMemo", "");
                m_SupplierId   = DBTool.GetIntFromRow(row, "SupplierId", 0);
                m_InPrice      = DBTool.GetDoubleFromRow(row, "InPrice", 0);
                SprInvoiceType = DBTool.GetStringFromRow(row, "SprInvoiceType", "");
                SprTaxRate     = DBTool.GetDoubleFromRow(row, "SprTaxRate", 0);
                return(true);
            }
            return(false);
        }
예제 #3
0
        public bool Load()
        {
            string  sql = string.Format("select * from TPI_Goods where GoodsId={0} and ProjectId={1}", GoodsId, ProjectId);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id              = DBTool.GetIntFromRow(row, "Id", 0);
                Sku             = DBTool.GetStringFromRow(row, "Sku", "");
                SkuName         = DBTool.GetStringFromRow(row, "SkuName", "");
                ReferencePrice  = DBTool.GetDoubleFromRow(row, "ReferencePrice", 0);
                AgreementPrice  = DBTool.GetDoubleFromRow(row, "AgreementPrice", 0);
                GoodsId         = DBTool.GetIntFromRow(row, "GoodsId", 0);
                IshaveImage     = DBTool.GetIntFromRow(row, "IshaveImage", 0);
                IsUnitAgreement = DBTool.GetIntFromRow(row, "IsUnitAgreement", 0);
                State           = DBTool.GetIntFromRow(row, "State", 0);
                ProjectId       = DBTool.GetIntFromRow(row, "ProjectId", 0);
                Stock           = DBTool.GetIntFromRow(row, "Stock", 0);
                PushState       = DBTool.GetIntFromRow(row, "PushState", 0);
                ResultMsg       = DBTool.GetStringFromRow(row, "ResultMsg", "");
                AddTime         = DBTool.GetDateTimeFromRow(row, "AddTime");
                return(true);
            }
            return(false);
        }
예제 #4
0
        /// <summary>
        /// ERP  FSysUserInfo.cs 中调用
        /// </summary>
        /// <returns></returns>
        public bool Load()
        {
            string  sql = string.Format("select * from Sys_Users inner join Sys_Branch on Sys_Users.BranchId = Sys_Branch.Id where Sys_Users.Id={0} ", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id           = DBTool.GetIntFromRow(row, "Id", 0);
                LoginName    = DBTool.GetStringFromRow(row, "LoginName", "");
                PassWord     = DBTool.GetStringFromRow(row, "PassWord", "");
                Name         = DBTool.GetStringFromRow(row, "Name", "");
                BranchId     = DBTool.GetIntFromRow(row, "BranchId", 0);
                DeptId       = DBTool.GetIntFromRow(row, "DeptId", 0);
                IsSales      = DBTool.GetIntFromRow(row, "IsSales", 0);
                Telphone     = DBTool.GetStringFromRow(row, "Telphone", "");
                Mobile       = DBTool.GetStringFromRow(row, "Mobile", "");
                BirthDay     = DBTool.GetDateTimeFromRow(row, "BirthDay");
                IsYinLi      = DBTool.GetIntFromRow(row, "IsYinLi", 0);
                JoinDate     = DBTool.GetDateTimeFromRow(row, "JoinDate");
                IDCard       = DBTool.GetStringFromRow(row, "IDCard", "");
                ModifyTime   = DBTool.GetDateTimeFromRow(row, "ModifyTime");
                IsValid      = DBTool.GetIntFromRow(row, "IsValid", 0);
                Position     = DBTool.GetStringFromRow(row, "Position", "");
                SN1          = DBTool.GetStringFromRow(row, "SN1", "");
                SN2          = DBTool.GetStringFromRow(row, "SN2", "");
                IsAdmin      = DBTool.GetIntFromRow(row, "IsAdmin", 0);
                token        = DBTool.GetStringFromRow(row, "token", "");
                tokenEndDate = DBTool.GetDateTimeFromRow(row, "tokenEndDate");
                return(true);
            }
            return(false);
        }
예제 #5
0
        public bool Load()
        {
            string  sql = string.Format("select * from InvoiceRequire where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id              = DBTool.GetIntFromRow(row, "Id", 0);
                m_ComId           = DBTool.GetIntFromRow(row, "ComId", 0);
                m_StatementId     = DBTool.GetIntFromRow(row, "StatementId", 0);
                m_InvoiceName     = DBTool.GetStringFromRow(row, "InvoiceName", "");
                m_InvoiceType     = DBTool.GetStringFromRow(row, "InvoiceType", "");
                m_InvoiceContent  = DBTool.GetStringFromRow(row, "InvoiceContent", "");
                m_InvoiceAmount   = DBTool.GetDoubleFromRow(row, "InvoiceAmount", 0);
                m_InvoiceMemo     = DBTool.GetStringFromRow(row, "InvoiceMemo", "");
                m_UserId          = DBTool.GetIntFromRow(row, "UserId", 0);
                m_UpdateTime      = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                m_InvoiceStatus   = DBTool.GetStringFromRow(row, "InvoiceStatus", "");
                m_MemberInvoiceId = DBTool.GetIntFromRow(row, "MemberInvoiceId", 0);
                m_applicationNo   = DBTool.GetStringFromRow(row, "applicationNo", "");
                return(true);
            }
            return(false);
        }
예제 #6
0
 private void LoadFromRow(DataRow row)
 {
     Id = DBTool.GetIntFromRow(row, "Id", 0);
     ThirdPartyOrderId = DBTool.GetStringFromRow(row, "ThirdPartyOrderId", "");
     ProjectId         = DBTool.GetIntFromRow(row, "ProjectId", 0);
     RealName          = DBTool.GetStringFromRow(row, "RealName", "");
     Province          = DBTool.GetStringFromRow(row, "Province", "");
     City             = DBTool.GetStringFromRow(row, "City", "");
     County           = DBTool.GetStringFromRow(row, "County", "");
     Town             = DBTool.GetStringFromRow(row, "Town", "");
     Address          = DBTool.GetStringFromRow(row, "Address", "");
     Zip              = DBTool.GetStringFromRow(row, "Zip", "");
     Phone            = DBTool.GetStringFromRow(row, "Phone", "");
     Mobile           = DBTool.GetStringFromRow(row, "Mobile", "");
     Email            = DBTool.GetStringFromRow(row, "Email", "");
     Remark           = DBTool.GetStringFromRow(row, "Remark", "");
     InvoiceTitle     = DBTool.GetStringFromRow(row, "InvoiceTitle", "");
     InvoiceState     = DBTool.GetIntFromRow(row, "InvoiceState", 0);
     InvoiceType      = DBTool.GetIntFromRow(row, "InvoiceType", 0);
     InvoiceContent   = DBTool.GetIntFromRow(row, "InvoiceContent", 0);
     Amount           = DBTool.GetDecimalFromRow(row, "Amount", 0);
     Freight          = DBTool.GetIntFromRow(row, "Freight", 0);
     Payment          = DBTool.GetStringFromRow(row, "Payment", "");
     ReviewId         = DBTool.GetIntFromRow(row, "ReviewId", 0);
     OrderStatus      = DBTool.GetStringFromRow(row, "OrderStatus", "");
     IsTransformation = DBTool.GetIntFromRow(row, "IsTransformation", 0);
     OrderTime        = DBTool.GetDateTimeFromRow(row, "OrderTime");
     ItemDeliveryId   = DBTool.GetStringFromRow(row, "ItemDeliveryId", "");
     DeliveryCode     = DBTool.GetStringFromRow(row, "DeliveryCode", "");
     PrId             = DBTool.GetStringFromRow(row, "PrId", "");
 }
예제 #7
0
파일: News.cs 프로젝트: kalmouse/leading
        public bool Load()
        {
            string  sql = string.Format("select * from News where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id           = DBTool.GetIntFromRow(row, "Id", 0);
                m_Title        = DBTool.GetStringFromRow(row, "Title", "");
                m_NewsTypeId   = DBTool.GetIntFromRow(row, "NewsTypeId", 0);
                m_NewsKeywords = DBTool.GetStringFromRow(row, "NewsKeywords", "");
                m_Author       = DBTool.GetStringFromRow(row, "Author", "");
                m_PublishDate  = DBTool.GetDateTimeFromRow(row, "PublishDate");
                m_ImageUrl     = DBTool.GetStringFromRow(row, "ImageUrl", "");
                m_Content      = DBTool.GetStringFromRow(row, "Content", "");
                m_Recommend    = DBTool.GetIntFromRow(row, "Recommend", 0);
                m_Describe     = DBTool.GetStringFromRow(row, "Describe", "");
                m_BranchId     = DBTool.GetIntFromRow(row, "BranchId", 0);
                m_IsCheck      = DBTool.GetIntFromRow(row, "IsCheck", 0);

                return(true);
            }
            return(false);
        }
예제 #8
0
        /// <summary>tpi_project
        /// 验证某项目的账号密码和开关设置等。
        /// </summary>
        /// <returns></returns>
        public bool LoadTPI_Users()
        {
            DataTable dt = GetTPI_Users();

            if (dt.Rows.Count > 0)
            {
                DataRow row = dt.Rows[0];
                Option.ProjectId        = DBTool.GetIntFromRow(row, "ProjectId", 0);
                Option.ProjectName      = DBTool.GetStringFromRow(row, "ProjectName", "");
                Option.BranchId         = DBTool.GetIntFromRow(row, "BranchId", 0);
                Option.IsUseTypeCompare = DBTool.GetIntFromRow(row, "IsUseTypeCompare", 0);
                Option.Developers       = DBTool.GetStringFromRow(row, "Developers", "");
                Option.AppKey           = DBTool.GetStringFromRow(row, "AppKey", "");
                Option.AppPassword      = DBTool.GetStringFromRow(row, "AppPassword", "");
                Option.AppSecret        = DBTool.GetStringFromRow(row, "AppSecret", "");
                Option.Token            = DBTool.GetStringFromRow(row, "Token", "");
                Option.CallDate         = DBTool.GetDateTimeFromRow(row, "CallDate");
                Option.EndDate          = DBTool.GetDateTimeFromRow(row, "EndDate");
                Option.State            = DBTool.GetIntFromRow(row, "State", 0);
                Option.interfaceVersion = DBTool.GetStringFromRow(row, "InterfaceVersion", "");
                Option.Sign             = DBTool.GetStringFromRow(row, "Sign", "");
                return(true);
            }
            return(false);
        }
예제 #9
0
 private void LoadFromRow(DataRow row)
 {
     Id           = DBTool.GetIntFromRow(row, "Id", 0);
     Email        = DBTool.GetStringFromRow(row, "Email", "");
     PassWord     = DBTool.GetStringFromRow(row, "PassWord", "");
     LastSendTime = DBTool.GetDateTimeFromRow(row, "LastSendTime");
 }
예제 #10
0
        public bool Load()
        {
            string  sql = string.Format("select * from Transfer where id={0}", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id             = DBTool.GetIntFromRow(row, "Id", 0);
                OutBranchId    = DBTool.GetIntFromRow(row, "OutBranchId", 0);
                InBranchId     = DBTool.GetIntFromRow(row, "InBranchId", 0);
                OutStoreId     = DBTool.GetIntFromRow(row, "OutStoreId", 0);
                OutStoreUserId = DBTool.GetIntFromRow(row, "OutStoreUserId", 0);
                InStoreId      = DBTool.GetIntFromRow(row, "InStoreId", 0);
                InStoreUserId  = DBTool.GetIntFromRow(row, "InStoreUserId", 0);
                Memo           = DBTool.GetStringFromRow(row, "Memo", "");
                UpdateDate     = DBTool.GetDateTimeFromRow(row, "UpdateDate");
                OutStoreDate   = DBTool.GetDateTimeFromRow(row, "OutStoreDate");
                InStoreDate    = DBTool.GetDateTimeFromRow(row, "InStoreDate");
                Status         = DBTool.GetStringFromRow(row, "Status", "");
                IsInner        = DBTool.GetIntFromRow(row, "IsInner", 0);
                return(true);
            }
            return(false);
        }
예제 #11
0
        public bool Load()
        {
            string  sql = string.Format("select * from GoodsBrowse where id={0}", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id          = DBTool.GetIntFromRow(row, "Id", 0);
                GoodsId     = DBTool.GetIntFromRow(row, "GoodsId", 0);
                LoginName   = DBTool.GetStringFromRow(row, "LoginName", "");
                Company     = DBTool.GetStringFromRow(row, "Company", "");
                IsIntheCart = DBTool.GetIntFromRow(row, "IsIntheCart", 0);
                Ip          = DBTool.GetStringFromRow(row, "Ip", "");
                Port        = DBTool.GetStringFromRow(row, "Port", "");
                Province    = DBTool.GetStringFromRow(row, "Province", "");
                City        = DBTool.GetStringFromRow(row, "City", "");
                BrowseType  = DBTool.GetStringFromRow(row, "BrowseType", "");
                ClientMark  = DBTool.GetStringFromRow(row, "ClientMark", "");
                Guid        = DBTool.GetStringFromRow(row, "Guid", "");
                UpdateTime  = DBTool.GetDateTimeFromRow(row, "UpdateTime");

                return(true);
            }
            return(false);
        }
예제 #12
0
        public bool Load()
        {
            string  sql = string.Format("select * from MemberAddress where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id        = DBTool.GetIntFromRow(row, "Id", 0);
                m_MemberId  = DBTool.GetIntFromRow(row, "MemberId", 0);
                m_RealName  = DBTool.GetStringFromRow(row, "RealName", "");
                m_Address   = DBTool.GetStringFromRow(row, "Address", "");
                m_Province  = DBTool.GetStringFromRow(row, "Province", "");
                m_City      = DBTool.GetStringFromRow(row, "City", "");
                m_Area      = DBTool.GetStringFromRow(row, "Area", "");
                m_Street    = DBTool.GetStringFromRow(row, "Street", "");
                m_Mansion   = DBTool.GetStringFromRow(row, "Mansion", "");
                m_Room      = DBTool.GetStringFromRow(row, "Room", "");
                m_TelPhone  = DBTool.GetStringFromRow(row, "TelPhone", "");
                m_Mobile    = DBTool.GetStringFromRow(row, "Mobile", "");
                m_Email     = DBTool.GetStringFromRow(row, "Email", "");
                m_IsDefault = DBTool.GetIntFromRow(row, "IsDefault", 0);
                m_IdCard    = DBTool.GetStringFromRow(row, "IdCard", "");
                return(true);
            }
            return(false);
        }
예제 #13
0
        /// <summary>
        /// 更改对账单 开票金额
        /// </summary>
        /// <param name="osId"></param>
        /// <returns></returns>
        public bool UpdateOrderStatementInvoiceData(int osId)
        {
            string         sql = string.Format(@"select InvoiceStatus,Sum(invoiceAmount) as InvoiceAmount  
    from InvoiceRequire where StatementId={0} group by InvoiceStatus ", osId);
            DataSet        ds  = m_dbo.GetDataSet(sql);
            OrderStatement os  = new OrderStatement();

            os.Id = osId;
            os.Load();
            os.InvoiceMoney  = 0;
            os.NeedToInvoice = 0;
            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    if (DBTool.GetStringFromRow(row, "InvoiceStatus", "") == CommenClass.InvoiceStatus.待开票.ToString())
                    {
                        os.NeedToInvoice = DBTool.GetDoubleFromRow(row, "InvoiceAmount", 0);
                    }
                    else if (DBTool.GetStringFromRow(row, "InvoiceStatus", "") == CommenClass.InvoiceStatus.已开票.ToString())
                    {
                        os.InvoiceMoney = DBTool.GetDoubleFromRow(row, "InvoiceAmount", 0);
                    }
                }
            }
            if (os.Save() > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #14
0
        public bool Load()
        {
            string  sql = string.Format("select * from CrawInfo where id={0}", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id               = DBTool.GetIntFromRow(row, "Id", 0);
                BiddingName      = DBTool.GetStringFromRow(row, "BiddingName", "");
                BiddingUrl       = DBTool.GetStringFromRow(row, "BiddingUrl", "");
                Biddingcharset   = DBTool.GetStringFromRow(row, "Biddingcharset", "");
                Brddingrecording = DBTool.GetStringFromRow(row, "Brddingrecording", "");
                CrawlUrl         = DBTool.GetStringFromRow(row, "CrawlUrl", "");
                Crawtitle        = DBTool.GetStringFromRow(row, "Crawtitle", "");
                Istitle          = DBTool.GetIntFromRow(row, "Istitle", 0);
                Crawarea         = DBTool.GetStringFromRow(row, "Crawarea", "");
                CrawTime         = DBTool.GetStringFromRow(row, "CrawTime", "");
                CrawPosition     = DBTool.GetStringFromRow(row, "CrawPosition", "");
                Crawfrequency    = DBTool.GetIntFromRow(row, "Crawfrequency", 0);
                Remark           = DBTool.GetStringFromRow(row, "Remark", "");
                return(true);
            }
            return(false);
        }
예제 #15
0
        public bool Load()
        {
            string  sql = string.Format("select * from Sys_Branch where id={0}", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id               = DBTool.GetIntFromRow(row, "Id", 0);
                Name             = DBTool.GetStringFromRow(row, "Name", "");
                ShortName        = DBTool.GetStringFromRow(row, "ShortName", "");
                City             = DBTool.GetStringFromRow(row, "City", "");
                Address          = DBTool.GetStringFromRow(row, "Address", "");
                Telphone         = DBTool.GetStringFromRow(row, "Telphone", "");
                LinkMan          = DBTool.GetStringFromRow(row, "LinkMan", "");
                Bank             = DBTool.GetStringFromRow(row, "Bank", "");
                Account          = DBTool.GetStringFromRow(row, "Account", "");
                Complain_hotline = DBTool.GetStringFromRow(row, "Complain_hotline", "");
                Print_title      = DBTool.GetStringFromRow(row, "Print_title", "");
                Province         = DBTool.GetStringFromRow(row, "Province", "");
                IsUnable         = DBTool.GetIntFromRow(row, "IsUnable", 0);
                ProvinceSort     = DBTool.GetIntFromRow(row, "ProvinceSort", 0);
                CitySort         = DBTool.GetIntFromRow(row, "CitySort", 0);
                IsUseSiteGoods   = DBTool.GetIntFromRow(row, "IsUseSiteGoods", 0);
                CityId           = DBTool.GetIntFromRow(row, "CityId", 0);
                return(true);
            }
            return(false);
        }
예제 #16
0
        public bool Load()
        {
            string  sql = string.Format("select * from Invoice where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id               = DBTool.GetIntFromRow(row, "Id", 0);
                m_BranchId         = DBTool.GetIntFromRow(row, "BranchId", 0);
                m_ComId            = DBTool.GetIntFromRow(row, "ComId", 0);
                m_OrderStatementId = DBTool.GetIntFromRow(row, "OrderStatementId", 0);
                m_InvoiceRequireId = DBTool.GetIntFromRow(row, "InvoiceRequireId", 0);
                m_InvoiceDate      = DBTool.GetDateTimeFromRow(row, "InvoiceDate");
                m_InvoiceNo        = DBTool.GetStringFromRow(row, "InvoiceNo", "");
                m_InvoiceType      = DBTool.GetStringFromRow(row, "InvoiceType", "");
                m_InvoiceMoney     = DBTool.GetDoubleFromRow(row, "InvoiceMoney", 0);
                m_Memo             = DBTool.GetStringFromRow(row, "Memo", "");
                m_UpdateTime       = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                m_UserId           = DBTool.GetIntFromRow(row, "UserId", 0);
                m_PrintNum         = DBTool.GetIntFromRow(row, "PrintNum", 0);
                m_PrintTime        = DBTool.GetDateTimeFromRow(row, "PrintTime");
                return(true);
            }
            return(false);
        }
예제 #17
0
        /// <summary>
        /// 通过ProjectId获取项目信息
        /// </summary>
        /// <returns>bool 返回单条记录的对象</returns>
        public bool Load()
        {
            string  sql = string.Format("select * from TPI_Project where Id={0}", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id                = DBTool.GetIntFromRow(row, "Id", 0);
                Name              = DBTool.GetStringFromRow(row, "Name", "");
                UpdateTime        = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                IsUseTypeCompare  = DBTool.GetIntFromRow(row, "IsUseTypeCompare", 0);
                IsUseBrandCompare = DBTool.GetIntFromRow(row, "IsUseBrandCompare", 0);
                BranchId          = DBTool.GetIntFromRow(row, "BranchId", 0);

                Developers = DBTool.GetStringFromRow(row, "Developers", "");
                PortNumber = DBTool.GetIntFromRow(row, "PortNumber", 0);
                Note       = DBTool.GetStringFromRow(row, "Note", "");
                Url        = DBTool.GetStringFromRow(row, "Url", "");
                PushType   = DBTool.GetIntFromRow(row, "PushType", 0);
                IsDiscount = DBTool.GetIntFromRow(row, "IsDiscount", 0);
                return(true);
            }
            return(false);
        }
예제 #18
0
        public bool Load()
        {
            string  sql = string.Format("select * from TPI_SupplierOrder where id={0}", Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id           = DBTool.GetIntFromRow(row, "Id", 0);
                OrderId      = DBTool.GetIntFromRow(row, "OrderId", 0);
                RealName     = DBTool.GetStringFromRow(row, "RealName", "");
                Address      = DBTool.GetStringFromRow(row, "Address", "");
                DetailStreet = DBTool.GetStringFromRow(row, "DetailStreet", "");
                ZipCode      = DBTool.GetStringFromRow(row, "ZipCode", "");
                Telephone    = DBTool.GetStringFromRow(row, "Telephone", "");
                Mobile       = DBTool.GetStringFromRow(row, "Mobile", "");
                Email        = DBTool.GetStringFromRow(row, "Email", "");
                Memo         = DBTool.GetStringFromRow(row, "Memo", "");
                Amount       = DBTool.GetDoubleFromRow(row, "Amount", 0);
                ShipFree     = DBTool.GetDoubleFromRow(row, "ShipFree", 0);
                GoodsList    = DBTool.GetStringFromRow(row, "GoodsList", "");
                UpdateTime   = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                UsersId      = DBTool.GetIntFromRow(row, "UsersId", 0);
                //Distribution = DBTool.GetIntFromRow(row, "Distribution", 0);
                return(true);
            }
            return(false);
        }
예제 #19
0
        public bool Load()
        {
            string  sql = string.Format("select * from GoodsStoreDetail where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id         = DBTool.GetIntFromRow(row, "Id", 0);
                m_StoreId    = DBTool.GetIntFromRow(row, "StoreId", 0);
                m_GoodsId    = DBTool.GetIntFromRow(row, "GoodsId", 0);
                m_Model      = DBTool.GetStringFromRow(row, "Model", "");
                m_OldNum     = DBTool.GetIntFromRow(row, "OldNum", 0);
                m_Num        = DBTool.GetIntFromRow(row, "Num", 0);
                m_NewNum     = DBTool.GetIntFromRow(row, "NewNum", 0);
                m_Operate    = DBTool.GetStringFromRow(row, "Operate", "");
                m_RelationId = DBTool.GetIntFromRow(row, "RelationId", 0);
                m_Memo       = DBTool.GetStringFromRow(row, "Memo", "");
                m_UserId     = DBTool.GetIntFromRow(row, "UserId", 0);
                m_AC         = DBTool.GetDoubleFromRow(row, "AC", 0);
                TaxAC        = DBTool.GetDoubleFromRow(row, "TaxAC", 0);
                m_UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                return(true);
            }
            return(false);
        }
예제 #20
0
        /// <summary>
        /// 获取 内部平台最新版本
        /// </summary>
        /// <returns></returns>
        public string ReadLastVersion()
        {
            string  sql = "select max([version]) as [version] from Sys_Updater where Name = 'PlatForm' ";
            DataSet ds  = m_dbo.GetDataSet(sql);

            return(DBTool.GetStringFromRow(ds.Tables[0].Rows[0], "version", ""));
        }
예제 #21
0
        public bool Load(int pId, int goodsId)
        {
            string  sql = string.Format("select * from PurchaseDetail where PurchaseId={0} and GoodsId={1}", pId, goodsId);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id          = DBTool.GetIntFromRow(row, "Id", 0);
                m_PurchaseId  = DBTool.GetIntFromRow(row, "PurchaseId", 0);
                m_GoodsId     = DBTool.GetIntFromRow(row, "GoodsId", 0);
                m_StoreId     = DBTool.GetIntFromRow(row, "StoreId", 0);
                m_Model       = DBTool.GetStringFromRow(row, "Model", "");
                m_BillsPrice  = DBTool.GetDoubleFromRow(row, "BillsPrice", 0);
                m_InPrice     = DBTool.GetDoubleFromRow(row, "InPrice", 0);
                m_Num         = DBTool.GetIntFromRow(row, "Num", 0);
                m_Amount      = DBTool.GetDoubleFromRow(row, "Amount", 0);
                m_OldStore    = DBTool.GetIntFromRow(row, "OldStore", 0);
                m_OldAC       = DBTool.GetDoubleFromRow(row, "OldAC", 0);
                m_ReceivedNum = DBTool.GetIntFromRow(row, "ReceivedNum", 0);
                m_Emergency   = DBTool.GetIntFromRow(row, "Emergency", 0);
                TaxInPrice    = DBTool.GetDoubleFromRow(row, "TaxInPrice", 0);
                return(true);
            }
            return(false);
        }
예제 #22
0
파일: Notice.cs 프로젝트: kalmouse/leading
 private bool LoadFromRow(DataRow row)
 {
     Id             = DBTool.GetIntFromRow(row, "Id", 0);
     ReleaseName    = DBTool.GetStringFromRow(row, "ReleaseName", "");
     MessageContent = DBTool.GetStringFromRow(row, "MessageContent", "");
     UpdateTime     = DBTool.GetDateTimeFromRow(row, "UpdateTime");
     return(true);
 }
예제 #23
0
파일: Sys_Car.cs 프로젝트: kalmouse/leading
 private void LoadFromRow(DataRow row)
 {
     Id         = DBTool.GetIntFromRow(row, "Id", 0);
     BranchId   = DBTool.GetIntFromRow(row, "BranchId", 0);
     Plate      = DBTool.GetStringFromRow(row, "Plate", "");
     IsEnable   = DBTool.GetIntFromRow(row, "IsEnable", 0);
     Memo       = DBTool.GetStringFromRow(row, "Memo", "");
     UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime");
 }
예제 #24
0
        public bool OrderModifyPurchaseSave(DataTable dtNeedToPurchaseDetail, int branchId, int StoreId, string OrderModifyIdTable)
        {
            DataTable dt = dtNeedToPurchaseDetail.DefaultView.ToTable(true, "SupplierId", "UserId", "PurchaseType");

            if (dt.Rows.Count > 0)
            {
                int SId = 0;
                foreach (DataRow drSupplier in dt.Rows)
                {
                    int SupplierId = DBTool.GetIntFromRow(drSupplier, "SupplierId", 0);
                    if (SId == SupplierId && SupplierId != 0)
                    {
                        continue;
                    }
                    int      UserId       = DBTool.GetIntFromRow(drSupplier, "UserId", 0);
                    string   PurchaseType = DBTool.GetStringFromRow(drSupplier, "PurchaseType", "");
                    Purchase p            = new Purchase();
                    p.BranchId         = branchId;
                    p.NeedToPurchaseId = NeedToPurchaseId;
                    p.PurchaseStatus   = CommenClass.PurchaseStatus.未处理.ToString();
                    p.PurchaseType     = PurchaseType;
                    p.UserId           = 0;
                    p.StoreId          = StoreId;
                    p.SupplierId       = SupplierId;
                    p.PurchaseUserId   = UserId;
                    int purchaseId = p.Save();
                    if (purchaseId > 0)
                    {
                        string    sql = string.Format("SupplierId='{0}'", SupplierId);
                        DataRow[] drw = dtNeedToPurchaseDetail.Select(sql);
                        foreach (DataRow dr in drw)
                        {
                            PurchaseDetail pd = new PurchaseDetail();
                            pd.PurchaseId = purchaseId;
                            pd.GoodsId    = DBTool.GetIntFromRow(dr, "GoodsId", 0);
                            pd.StoreId    = StoreId;
                            pd.Model      = "";
                            pd.BillsPrice = DBTool.GetDoubleFromRow(dr, "InPrice", 0);
                            pd.InPrice    = DBTool.GetDoubleFromRow(dr, "InPrice", 0);
                            pd.Num        = DBTool.GetIntFromRow(dr, "LackNum", 0);
                            pd.Amount     = pd.InPrice * pd.Num;
                            pd.Save();
                        }
                        SId = SupplierId;
                        PurchaseManager pm = new PurchaseManager();
                        pm.UpdatePurchaseSumMoney(purchaseId);
                    }
                }
                if (SId > 0)
                {
                    OrderModify om = new OrderModify();
                    return(om.UpdatePurchaseType(OrderModifyIdTable));
                }
            }
            return(false);
        }
예제 #25
0
 private void LoadFromRow(DataRow row)
 {
     Id         = DBTool.GetIntFromRow(row, "Id", 0);
     OrderId    = DBTool.GetIntFromRow(row, "OrderId", 0);
     Page       = DBTool.GetIntFromRow(row, "Page", 0);
     PhotoUrl   = DBTool.GetStringFromRow(row, "PhotoUrl", "");
     SaveNum    = DBTool.GetIntFromRow(row, "SaveNum", 0);
     UserId     = DBTool.GetIntFromRow(row, "UserId", 0);
     UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime");
 }
예제 #26
0
        public bool Load()
        {
            string  sql = string.Format("select * from Supplier where id={0}", m_Id);
            DataSet ds  = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                m_Id                         = DBTool.GetIntFromRow(row, "Id", 0);
                m_AddTime                    = DBTool.GetDateTimeFromRow(row, "AddTime");
                m_UpdateTime                 = DBTool.GetDateTimeFromRow(row, "UpdateTime");
                m_Company                    = DBTool.GetStringFromRow(row, "Company", "");
                m_ShortName                  = DBTool.GetStringFromRow(row, "ShortName", "");
                m_Type                       = DBTool.GetStringFromRow(row, "Type", "");
                m_Attitude                   = DBTool.GetStringFromRow(row, "Attitude", "");
                m_PriceSheet                 = DBTool.GetIntFromRow(row, "PriceSheet", 0);
                m_InvoiceType                = DBTool.GetStringFromRow(row, "InvoiceType", "");
                m_PayType                    = DBTool.GetStringFromRow(row, "PayType", "");
                m_YearTarget                 = DBTool.GetIntFromRow(row, "YearTarget", 0);
                m_MonthAmount                = DBTool.GetDoubleFromRow(row, "MonthAmount", 0);
                m_LinkMan1                   = DBTool.GetStringFromRow(row, "LinkMan1", "");
                m_LinkMan2                   = DBTool.GetStringFromRow(row, "LinkMan2", "");
                m_TelPhone1                  = DBTool.GetStringFromRow(row, "TelPhone1", "");
                m_TelPhone2                  = DBTool.GetStringFromRow(row, "TelPhone2", "");
                m_Mobile1                    = DBTool.GetStringFromRow(row, "Mobile1", "");
                m_Mobile2                    = DBTool.GetStringFromRow(row, "Mobile2", "");
                m_QQ1                        = DBTool.GetStringFromRow(row, "QQ1", "");
                m_QQ2                        = DBTool.GetStringFromRow(row, "QQ2", "");
                m_Address                    = DBTool.GetStringFromRow(row, "Address", "");
                m_MainBrand                  = DBTool.GetStringFromRow(row, "MainBrand", "");
                m_Major                      = DBTool.GetStringFromRow(row, "Major", "");
                m_BillsDiscount              = DBTool.GetIntFromRow(row, "BillsDiscount", 100);
                m_Branchid                   = DBTool.GetIntFromRow(row, "BranchId", 1);
                m_ContractType               = DBTool.GetStringFromRow(row, "ContractType", "");
                m_IsChangRefund              = DBTool.GetStringFromRow(row, "IsChangRefund", "");
                m_PurchasRewards             = DBTool.GetStringFromRow(row, "PurchasRewards", "");
                m_PaymentMethod              = DBTool.GetStringFromRow(row, "PaymentMethod", "");
                m_AccountNum                 = DBTool.GetStringFromRow(row, "AccountNum", "");
                m_TaxpayerIdentificationCode = DBTool.GetStringFromRow(row, "TaxpayerIdentificationCode", "");
                m_OpenBank                   = DBTool.GetStringFromRow(row, "OpenBank", "");
                m_FinancialLinkMan           = DBTool.GetStringFromRow(row, "FinancialLinkMan", "");
                m_FinancialTelPhone          = DBTool.GetStringFromRow(row, "FinancialTelPhone", "");
                m_Other                      = DBTool.GetStringFromRow(row, "Other", "");
                m_GoodsTypeId                = DBTool.GetIntFromRow(row, "GoodsTypeId", 0);
                m_PY                         = DBTool.GetStringFromRow(row, "PY", "");
                m_TaxRate                    = DBTool.GetDoubleFromRow(row, "TaxRate", 0);
                m_OfficeAddress              = DBTool.GetStringFromRow(row, "OfficeAddress", "");
                m_WarhouseAddress            = DBTool.GetStringFromRow(row, "WarhouseAddress", "");
                m_Delivery                   = DBTool.GetStringFromRow(row, "Delivery", "");
                m_DeliveryRegion             = DBTool.GetStringFromRow(row, "DeliveryRegion", "");
                return(true);
            }
            return(false);
        }
예제 #27
0
        /// <summary>
        /// Load方法:参数值:用户名/密钥/接口版本
        /// </summary>
        /// <returns></returns>
        public bool Load()
        {
            string sql = "select * from TPI_Users where State=1 ";

            if (AppKey != null && AppKey != "")
            {
                sql += string.Format("and AppKey='{0}'", AppKey);
            }
            if (AppPassword != null && AppPassword != "")
            {
                sql += string.Format("and AppPassword='******'", AppPassword);
            }
            if (Token != null && Token != "")
            {
                sql += string.Format("and Token ='{0}'", Token);
            }
            if (InterfaceVersion != null && InterfaceVersion != "")
            {
                sql += string.Format("and InterfaceVersion like '%{0}%'", InterfaceVersion);
            }
            if (Sign != null && Sign != "")
            {
                sql += string.Format("and Sign='{0}'", Sign);
            }
            if (ProjectId > 0)
            {
                sql += string.Format("and ProjectId={0}", ProjectId);
            }
            if (AppSecret != null && AppSecret != "")
            {
                sql += string.Format("and AppSecret='{0}'", AppSecret);
            }
            DataSet ds = m_dbo.GetDataSet(sql);

            if (ds.Tables[0].Rows.Count > 0)
            {
                DataRow row = ds.Tables[0].Rows[0];
                Id               = DBTool.GetIntFromRow(row, "Id", 0);
                AppKey           = DBTool.GetStringFromRow(row, "AppKey", "");
                AppSecret        = DBTool.GetStringFromRow(row, "AppSecret", "");
                Sign             = DBTool.GetStringFromRow(row, "Sign", "");
                InterfaceVersion = DBTool.GetStringFromRow(row, "InterfaceVersion", "");
                Name             = DBTool.GetStringFromRow(row, "Name", "");
                Token            = DBTool.GetStringFromRow(row, "Token", "");
                State            = DBTool.GetIntFromRow(row, "State", 0);
                CallDate         = DBTool.GetDateTimeFromRow(row, "CallDate");
                EndDate          = DBTool.GetDateTimeFromRow(row, "EndDate");
                ProjectId        = DBTool.GetIntFromRow(row, "ProjectId", 0);
                AppPassword      = DBTool.GetStringFromRow(row, "AppPassword", "");
                ClientSecret     = DBTool.GetStringFromRow(row, "ClientSecret", "");
                return(true);
            }
            return(false);
        }
예제 #28
0
 public void LoadFromRow(DataRow row)
 {
     Id             = DBTool.GetIntFromRow(row, "Id", 0);
     OrderId        = DBTool.GetIntFromRow(row, "OrderId", 0);
     BoxId          = DBTool.GetIntFromRow(row, "BoxId", 0);
     Status         = DBTool.GetStringFromRow(row, "Status", "");
     PrintNum       = DBTool.GetIntFromRow(row, "PrintNum", 0);
     StoreZone      = DBTool.GetStringFromRow(row, "StoreZone", "");
     UpdateTime     = DBTool.GetDateTimeFromRow(row, "UpdateTime");
     OrderBoxStatus = DBTool.GetStringFromRow(row, "OrderBoxStatus", "");
 }
예제 #29
0
 private void LoadFromRow(DataRow row)
 {
     Id         = DBTool.GetIntFromRow(row, "Id", 0);
     StoreId    = DBTool.GetIntFromRow(row, "StoreId", 0);
     Type       = DBTool.GetStringFromRow(row, "Type", "");
     Name       = DBTool.GetStringFromRow(row, "Name", "");
     Code       = DBTool.GetStringFromRow(row, "Code", "");
     PCode      = DBTool.GetStringFromRow(row, "PCode", "");
     Memo       = DBTool.GetStringFromRow(row, "Memo", "");
     AddTime    = DBTool.GetDateTimeFromRow(row, "AddTime");
     UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime");
 }
예제 #30
0
파일: Gift.cs 프로젝트: kalmouse/leading
 private bool LoadFromRow(DataRow row)
 {
     Id         = DBTool.GetIntFromRow(row, "Id", 0);
     GoodsId    = DBTool.GetIntFromRow(row, "GoodsId", 0);
     Point      = DBTool.GetIntFromRow(row, "Point", 0);
     MaxNum     = DBTool.GetIntFromRow(row, "MaxNum", 0);
     IsValid    = DBTool.GetIntFromRow(row, "IsValid", 1);
     GiftName   = DBTool.GetStringFromRow(row, "GiftName", "");
     UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime");
     UserId     = DBTool.GetIntFromRow(row, "UserId", 0);
     return(true);
 }