Example #1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.Unify.Tb_Unify_CustomerLive model)
 {
     dal.Add(model);
 }
Example #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.Unify.Tb_Unify_CustomerLive model)
 {
     dal.Update(model);
 }
Example #3
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.Unify.Tb_Unify_CustomerLive> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.Unify.Tb_Unify_CustomerLive> modelList = new List <MobileSoft.Model.Unify.Tb_Unify_CustomerLive>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.Unify.Tb_Unify_CustomerLive model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.Unify.Tb_Unify_CustomerLive();
                    if (dt.Rows[n]["LiveSynchCode"].ToString() != "")
                    {
                        model.LiveSynchCode = new Guid(dt.Rows[n]["LiveSynchCode"].ToString());
                    }
                    if (dt.Rows[n]["CommSynchCode"].ToString() != "")
                    {
                        model.CommSynchCode = new Guid(dt.Rows[n]["CommSynchCode"].ToString());
                    }
                    if (dt.Rows[n]["CustSynchCode"].ToString() != "")
                    {
                        model.CustSynchCode = new Guid(dt.Rows[n]["CustSynchCode"].ToString());
                    }
                    if (dt.Rows[n]["RoomSynchCode"].ToString() != "")
                    {
                        model.RoomSynchCode = new Guid(dt.Rows[n]["RoomSynchCode"].ToString());
                    }
                    //model.UnLiveID=dt.Rows[n]["UnLiveID"].ToString();
                    if (dt.Rows[n]["LiveType"].ToString() != "")
                    {
                        model.LiveType = int.Parse(dt.Rows[n]["LiveType"].ToString());
                    }
                    model.L_BroadbandNum = dt.Rows[n]["L_BroadbandNum"].ToString();
                    model.L_FixedTel     = dt.Rows[n]["L_FixedTel"].ToString();
                    model.L_MobilePhone  = dt.Rows[n]["L_MobilePhone"].ToString();
                    model.L_IPTVAccount  = dt.Rows[n]["L_IPTVAccount"].ToString();
                    if (dt.Rows[n]["SubmitTime"].ToString() != "")
                    {
                        model.SubmitTime = DateTime.Parse(dt.Rows[n]["SubmitTime"].ToString());
                    }
                    if (dt.Rows[n]["FittingTime"].ToString() != "")
                    {
                        model.FittingTime = DateTime.Parse(dt.Rows[n]["FittingTime"].ToString());
                    }
                    if (dt.Rows[n]["StayTime"].ToString() != "")
                    {
                        model.StayTime = DateTime.Parse(dt.Rows[n]["StayTime"].ToString());
                    }
                    model.StayType = dt.Rows[n]["StayType"].ToString();
                    if (dt.Rows[n]["ChargingTime"].ToString() != "")
                    {
                        model.ChargingTime = DateTime.Parse(dt.Rows[n]["ChargingTime"].ToString());
                    }
                    model.ChargeCause = dt.Rows[n]["ChargeCause"].ToString();
                    if (dt.Rows[n]["ChargeTime"].ToString() != "")
                    {
                        model.ChargeTime = DateTime.Parse(dt.Rows[n]["ChargeTime"].ToString());
                    }
                    model.ContractSign = dt.Rows[n]["ContractSign"].ToString();
                    model.RightsSign   = dt.Rows[n]["RightsSign"].ToString();
                    model.PropertyUses = dt.Rows[n]["PropertyUses"].ToString();
                    if (dt.Rows[n]["StartDate"].ToString() != "")
                    {
                        model.StartDate = DateTime.Parse(dt.Rows[n]["StartDate"].ToString());
                    }
                    if (dt.Rows[n]["EndDate"].ToString() != "")
                    {
                        model.EndDate = DateTime.Parse(dt.Rows[n]["EndDate"].ToString());
                    }
                    if (dt.Rows[n]["ReletDate"].ToString() != "")
                    {
                        model.ReletDate = DateTime.Parse(dt.Rows[n]["ReletDate"].ToString());
                    }
                    if (dt.Rows[n]["IsActive"].ToString() != "")
                    {
                        model.IsActive = int.Parse(dt.Rows[n]["IsActive"].ToString());
                    }
                    if (dt.Rows[n]["IsDelLive"].ToString() != "")
                    {
                        model.IsDelLive = int.Parse(dt.Rows[n]["IsDelLive"].ToString());
                    }
                    if (dt.Rows[n]["IsDebts"].ToString() != "")
                    {
                        model.IsDebts = int.Parse(dt.Rows[n]["IsDebts"].ToString());
                    }
                    if (dt.Rows[n]["IsSale"].ToString() != "")
                    {
                        model.IsSale = int.Parse(dt.Rows[n]["IsSale"].ToString());
                    }
                    if (dt.Rows[n]["PurchaseArea"].ToString() != "")
                    {
                        model.PurchaseArea = decimal.Parse(dt.Rows[n]["PurchaseArea"].ToString());
                    }
                    if (dt.Rows[n]["PropertyArea"].ToString() != "")
                    {
                        model.PropertyArea = decimal.Parse(dt.Rows[n]["PropertyArea"].ToString());
                    }
                    if (dt.Rows[n]["LiveState"].ToString() != "")
                    {
                        model.LiveState = int.Parse(dt.Rows[n]["LiveState"].ToString());
                    }
                    model.BankName      = dt.Rows[n]["BankName"].ToString();
                    model.BankIDs       = dt.Rows[n]["BankIDs"].ToString();
                    model.BankAccount   = dt.Rows[n]["BankAccount"].ToString();
                    model.BankAgreement = dt.Rows[n]["BankAgreement"].ToString();
                    model.BankCode      = dt.Rows[n]["BankCode"].ToString();
                    model.BankNo        = dt.Rows[n]["BankNo"].ToString();
                    //model.OldCustID=dt.Rows[n]["OldCustID"].ToString();
                    if (dt.Rows[n]["SynchFlag"].ToString() != "")
                    {
                        model.SynchFlag = int.Parse(dt.Rows[n]["SynchFlag"].ToString());
                    }
                    //model.OrdSNum=dt.Rows[n]["OrdSNum"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }