コード例 #1
0
 /// <summary>
 /// 添加预约
 /// </summary>
 /// <param name="model">预约实体</param>
 /// <returns></returns>
 public bool AddAppointmentOrderInfo(AppointmentOrderInfoEntity model)
 {
     AdjDBObject adjDbObject = new AdjDBObject();
     bool isok = true;
     try
     {
         adjDbObject.GetStoredProcCommand("sp3_D_AppointmentOrderInfo_i");
         adjDbObject.AddOutParameter("@Id", DbType.Int32, 4);
         adjDbObject.AddInParameter("@AppointOrderId", DbType.String, model.AppointOrderId);
         adjDbObject.AddInParameter("@OrderId", DbType.String, model.OrderId);
         adjDbObject.AddInParameter("@AppointOrderType", DbType.Int32, model.AppointOrderType);
         adjDbObject.AddInParameter("@AppointOrderState", DbType.Int32, model.AppointOrderState);
         adjDbObject.AddInParameter("@BusinessType", DbType.Int32, model.BusinessType);
         adjDbObject.AddInParameter("@AppointOrderFrom", DbType.Int32, model.AppointOrderFrom);
         adjDbObject.AddInParameter("@CustomerId", DbType.String, model.CustomerId);
         adjDbObject.AddInParameter("@CustomerName", DbType.String, model.CustomerName);
         adjDbObject.AddInParameter("@CustomerType", DbType.Int32, model.CustomerType);
         adjDbObject.AddInParameter("@AccountType", DbType.Int32, model.AccountType);
         adjDbObject.AddInParameter("@Cellphone", DbType.String, model.Cellphone);
         adjDbObject.AddInParameter("@FromCellphone", DbType.String, model.FromCellphone);
         adjDbObject.AddInParameter("@AppointAddress", DbType.String, model.AppointAddress);
         adjDbObject.AddInParameter("@AppointTimeStr", DbType.String, model.AppointTimeStr);
         adjDbObject.AddInParameter("@AppointTime", DbType.DateTime, model.AppointTime);
         //adjDbObject.AddInParameter("@EstimateEndTime", DbType.DateTime, model.EstimateEndTime);
         adjDbObject.AddInParameter("@IsLock", DbType.Boolean, false);
         adjDbObject.AddInParameter("@LockUser", DbType.String, model.LockUser);
         adjDbObject.AddInParameter("@partyId", DbType.Int32, model.PartyId);
         adjDbObject.AddInParameter("@SendOrderUser", DbType.String, model.SendOrderUser);
         adjDbObject.AddInParameter("@AppointOrderSign", DbType.String, model.AppointOrderSign);
         adjDbObject.AddInParameter("@PhoneCallTime", DbType.Int32, model.PhoneCallTime);
         adjDbObject.AddInParameter("@lng", DbType.Double, model.Lng);
         adjDbObject.AddInParameter("@lat", DbType.Double, model.Lat);
         adjDbObject.AddInParameter("@create_time", DbType.DateTime, model.Create_time);
         adjDbObject.AddInParameter("@create_user", DbType.String, model.Create_user);
         //adjDbObject.AddInParameter("@update_time", DbType.DateTime, model.Update_time);
         // adjDbObject.AddInParameter("@update_user", DbType.String, model.Update_user);
         //adjDbObject.AddInParameter("@delete_time", DbType.DateTime, model.Delete_time);
         // adjDbObject.AddInParameter("@delete_user", DbType.String, model.Delete_user);
         // adjDbObject.AddInParameter("@delete_flag", DbType.Boolean, model.Delete_flag);
         adjDbObject.Execute();
     }
     catch (Exception ex)
     {
         isok = false;
     }
     return isok;
 }
コード例 #2
0
        public bool AddParterDyLog(T_ParterDyLog model)
        {
            AdjDBObject adjDbObject = new AdjDBObject();
            bool isok = true;
            try
            {
                adjDbObject.GetStoredProcCommand("sp3_T_ParterDyLog_i");
                adjDbObject.AddOutParameter("@id", DbType.Int32, 4);
                adjDbObject.AddInParameter("@sign", DbType.String, model.sign);
                adjDbObject.AddInParameter("@typeid", DbType.Int32, model.typeid);
                adjDbObject.AddInParameter("@imei", DbType.String, model.imei);
                adjDbObject.AddInParameter("@lat", DbType.String, model.lat);
                adjDbObject.AddInParameter("@lng", DbType.String, model.lng);
                adjDbObject.AddInParameter("@addtime", DbType.DateTime, model.addtime);
                adjDbObject.Execute();

            }
            catch (Exception ex)
            {
                isok = false;
            }
            return isok;
        }
コード例 #3
0
        /// <summary>
        /// 获取附近10个司机 优化过
        /// </summary>
        /// <param name="lat"></param>
        /// <param name="lng"></param>
        /// <returns></returns>
        public List<sjinfo> GetNewUserByLatlng(string lat, string lng, string parterid=null)
        {
            List<sjinfo> drvModels = new List<sjinfo>();
            AdjDBObject adjDbObject = new AdjDBObject();
            try
            {
                adjDbObject.GetStoredProcCommand("GetNearSjBylanlngCount");
                adjDbObject.AddInParameter("@lat", DbType.Double, lat);
                adjDbObject.AddInParameter("@lng", DbType.Double, lng);
                adjDbObject.AddInParameter("@online", DbType.Int32, 6);
                adjDbObject.AddInParameter("@onservice", DbType.Int32, 4);
                DataSet ds = adjDbObject.ExecuteDataSet();
                List<sjinfo> list = new List<sjinfo>();
                if (ds.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        sjinfo model = new sjinfo();
                        model.uid = row["id"].ToString();
                        model.ucode = row["ucode"].ToString();
                        model.name = row["realname"].ToString();
                        model.phone = "";//row["phone"].ToString();//row["phone"].ToString().Substring(0, 3) + "****" + row["phone"].ToString().Substring(7, 4);
                        model.pic = ConfigHelper.ImagePath + row["pic"].ToString();
                        model.jialin = row["jialin"].ToString();
                        model.cishu = row["cishu"].ToString();
                        model.SatisfactionRate = row["SatisfactionRate"] == DBNull.Value ? "" : row["SatisfactionRate"].ToString();
                        // model.istogether = Convert.ToInt32(row["IsTogether"].ToString());
                        if (Convert.ToBoolean(row["onservice"]))
                        {
                            model.state = "服务中";
                        }
                        else
                        {
                            model.state = "空闲中";
                        }
                        model.lat = row["lat"].ToString();
                        model.lng = row["lng"].ToString();
                        double mi = Convert.ToDouble(row["juli"]);
                        model.juli = mi;
                        model.jiguan = row["huji"].ToString();
                        if (!String.IsNullOrEmpty(row["idcode"].ToString()))
                        {
                            model.idcode = row["idcode"].ToString().Substring(0, row["idcode"].ToString().Length - 4) + "****";
                        }
                        else
                        {
                            model.idcode = String.Empty;
                        }
                        model.goodrate = row["hp"].ToString();
                        model.xinji = row["cp"].ToString();

                        if (!string.IsNullOrEmpty(parterid) && parterid.Equals("32d374227e5b70ab6cc55f1b994f0e7c"))  //如果合作商是中国4S在线那么电话将显示
                        {
                            model.phone = "4006138138";
                        }

                        drvModels.Add(model);
                    }
                }
                if (ds.Tables[1].Rows.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[1].Rows)
                    {
                        sjinfo model = new sjinfo();
                        model.uid = row["id"].ToString();
                        model.ucode = row["ucode"].ToString();
                        model.name = row["realname"].ToString();
                        model.phone = row["phone"].ToString();
                        model.pic = ConfigHelper.ImagePath + row["pic"].ToString();
                        model.jialin = row["jialin"].ToString();
                        model.cishu = row["cishu"].ToString();
                        // model.istogether = Convert.ToInt32(row["IsTogether"].ToString());
                        if (Convert.ToBoolean(row["onservice"]))
                        {
                            model.state = "服务中";
                        }
                        else
                        {
                            model.state = "空闲中";
                        }
                        model.lat = row["lat"].ToString();
                        model.lng = row["lng"].ToString();
                        double mi = Convert.ToDouble(row["juli"]);
                        model.juli = mi;
                        model.jiguan = row["huji"].ToString();
                        if (!String.IsNullOrEmpty(row["idcode"].ToString()))
                        {
                            model.idcode = row["idcode"].ToString().Substring(0, row["idcode"].ToString().Length - 4) + "****";
                        }
                        else
                        {
                            model.idcode = String.Empty;
                        }
                        model.goodrate = row["hp"].ToString();
                        model.xinji = row["cp"].ToString();
                        drvModels.Add(model);
                    }
                }
            }
            catch
            {
            }
            return drvModels;
        }