コード例 #1
0
 protected override void BasePage_Load(AutoRepair.Entity.tb_UsersEntity user)
 {
     if (user != null)
     {
         userId = user.UserId;
         AutoRepair.Entity.tb_LocationEntity locationModel = AutoRepair.BLL.tb_LocationBLL.GetInstance().GetAdminSingle(user.LocationId);
         if (locationModel != null)
         {
             string   path = locationModel.LocationPath;
             string[] arr  = path.Split('/');
             if (arr.Count() == 6)
             {
                 mark        = 1;
                 idCard      = user.IdCard;
                 realName    = user.RealName;
                 mail        = user.Mail;
                 locationId  = Convert.ToInt32(arr[2]);
                 locationId2 = Convert.ToInt32(arr[3]);
                 locationId3 = Convert.ToInt32(arr[4]);
             }
         }
         //绑定数据
         ddlProvince.DataSource     = AutoRepair.BLL.tb_LocationBLL.GetInstance().GetProvinceByCache();
         ddlProvince.DataTextField  = "LocationName";
         ddlProvince.DataValueField = "LocationId";
         ddlProvince.DataBind();
     }
     else
     {
         Response.Redirect("Registered.aspx");
     }
 }
コード例 #2
0
    protected override void BasePage_Load(AutoRepair.Entity.tb_UsersEntity user)
    {
        if (user != null)
        {
            //获取预约历史列表
            DataSet ds = AutoRepair.BLL.tb_SubscribeBLL.GetInstance().Gettb_ReservationRecordList(user.UserId);
            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
            {
                rptReservationList.DataSource = ds;
                rptReservationList.DataBind();
            }
            else
            {
                record = "<div style=\"font-size:15px;color:#d5d2d2;position:fixed;top:35%;left:30%;\">还没有预约记录……</div>";
            }

            //获取企业列表
            DataSet set = AutoRepair.BLL.T_RepairUnitBLL.GetInstance().GetRepairUnitScoreDsec();
            if (set != null && set.Tables.Count > 0)
            {
                rptrecommended.DataSource = set;
                rptrecommended.DataBind();
            }
        }
    }
コード例 #3
0
 /// <summary>
 /// 完善资料
 /// </summary>
 /// <param name="realName">真实姓名</param>
 /// <param name="mail">邮箱</param>
 /// <param name="idCard">身份证号</param>
 /// <param name="identityType">证件类型</param>
 /// <param name="userId">用户id</param>
 public void PerfectInfor(string realName, string mail, string idCard, int identityType, int userId, int locationId)
 {
     try
     {
         AutoRepair.Entity.tb_UsersEntity model = AutoRepair.BLL.tb_UsersBLL.GetInstance().GetAdminSingle(userId);
         if (model != null)
         {
             model.IdCard       = idCard;
             model.IdentityType = identityType;
             model.LocationId   = locationId;
             model.RealName     = SqlInject(realName);
             model.Mail         = SqlInject(mail);
             AutoRepair.BLL.tb_UsersBLL.GetInstance().Update(model);
             //MessageBox.ShowMsg(this, "添加成功!");
             Response.Write(1);
         }
         else
         {
             //MessageBox.ShowMsg(this, "数据不存在!");
             Response.Write(-2);
         }
     }
     catch (Exception ex)
     {
         Response.Write(-1);
         Jnwf.Utils.Log.Logger.Log4Net.Error("PerfectInfor:" + ex.Data + "|" + ex.Message);
     }
 }
コード例 #4
0
ファイル: Registered.aspx.cs プロジェクト: Hizcy/AutoRepair
 protected override void BasePage1_OpenInfoLoad(string openid)
 {
     //Jnwf.Utils.Log.Logger.Log4Net.Error("openid:"+ openid);
     AutoRepair.Entity.tb_UsersEntity model = AutoRepair.BLL.tb_UsersBLL.GetInstance().GetModelByOpenId(openid);
     if (model != null)
     {
         Response.Redirect("user/Person.aspx");
     }
     openId = openid;
 }
コード例 #5
0
ファイル: Person.aspx.cs プロジェクト: Hizcy/AutoRepair
    protected override void BasePage_Load(AutoRepair.Entity.tb_UsersEntity user)
    {
        DataSet ds = AutoRepair.BLL.tb_UsersBLL.GetInstance().Get_useropenid(user.OpenID);

        if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0)
        {
            img  = ds.Tables[0].Rows[0]["HeadImgurl"].ToString();
            name = ds.Tables[0].Rows[0]["NickName"].ToString();
        }
    }
コード例 #6
0
 /// <summary>
 /// 预约维修
 /// </summary>
 /// <param name="userId">用户id</param>
 /// <param name="phone">手机号</param>string phone,
 /// <param name="ordertime">预约时间</param>
 /// <param name="ordercontent">车辆故障描述</param>
 public void Order(int userId, string unitId, DateTime ordertime, string ordercontent)
 {
     try
     {
         bool flag = AutoRepair.BLL.tb_CarsBLL.GetInstance().IsCarsByUserId(userId);
         if (flag)
         {
             //最近是否预约过
             bool tmp = AutoRepair.BLL.tb_SubscribeBLL.GetInstance().IsSubscribeTrue(userId, unitId);
             if (!tmp)
             {
                 AutoRepair.Entity.tb_SubscribeEntity model = new AutoRepair.Entity.tb_SubscribeEntity();
                 model.UserId = userId;
                 model.UnitId = unitId;
                 //model.Phone = phone;
                 model.OrderTime    = ordertime;
                 model.OrderContent = SqlInject(ordercontent);
                 model.Addtime      = DateTime.Now;
                 model.Status       = 1;
                 int i = AutoRepair.BLL.tb_SubscribeBLL.GetInstance().Insert(model);
                 if (i > 0)
                 {
                     Response.Write(1);
                     AutoRepair.Entity.tb_UsersEntity userEntity = AutoRepair.BLL.tb_UsersBLL.GetInstance().GetAdminSingle(userId);
                     if (userEntity != null)
                     {
                         //发送短信
                         SmsHelper.YuyueSms(userEntity.Phone, "");
                     }
                 }
                 else
                 {
                     Response.Write(-1);
                 }
             }
             else
             {
                 //最近已经预约过
                 Response.Write(-2);
             }
         }
         else
         {
             //没有添加车辆数据
             Response.Write(-3);
         }
     }
     catch (Exception ex)
     {
         Response.Write(-1);
         Jnwf.Utils.Log.Logger.Log4Net.Error("预约维修Order:" + ex.Data + "|" + ex.Message);
     }
 }
コード例 #7
0
ファイル: UserIdentity.cs プロジェクト: Hizcy/AutoRepair
 public UserIdentity(string phone, string openId)
 {
     AutoRepair.Entity.tb_UsersEntity user = AutoRepair.BLL.tb_UsersBLL.GetInstance().GetUsersModelByPhoneAndOpenID(phone, openId);
     if (user != null)
     {
         this._phone    = user.Phone;
         this._realName = user.RealName;
         this._userId   = user.UserId;
         this._pwd      = user.Pwd;
         this._openID   = user.OpenID;
         this._mail     = user.Mail;
     }
 }
コード例 #8
0
 /// <summary>
 /// 注册信息/登入信息
 /// </summary>
 /// <param name="phone">手机号</param>
 /// <param name="pwd">密码</param>
 /// <param name="yzm">验证码</param>
 public void Regisetered(string phone, string openid, string yzm)
 {
     //查看是否当前的验证码有效存在
     AutoRepair.Entity.tb_VerificationCodeEntity verificationCode = AutoRepair.BLL.tb_VerificationCodeBLL.GetInstance().GetVerificationCodeModelByPhone(phone);
     if (verificationCode != null)
     {
         if (verificationCode.Code.Equals(yzm))
         {
             //该用户是否存在
             bool flag = AutoRepair.BLL.tb_UsersBLL.GetInstance().GetUsersModelByPhone(phone);
             if (!flag)
             {
                 AutoRepair.Entity.tb_UsersEntity model = new AutoRepair.Entity.tb_UsersEntity();
                 try
                 {
                     model.Phone   = phone.Trim();
                     model.OpenID  = openid.Trim();
                     model.Addtime = DateTime.Now;
                     int i = AutoRepair.BLL.tb_UsersBLL.GetInstance().Insert(model);
                     if (i > 0)
                     {
                         //MessageBox.ShowMsg(this,"注册成功!")
                         Response.Write(1);
                     }
                 }
                 catch (Exception ex)
                 {
                     //MessageBox.ShowMsg(this,"注册失败");
                     Response.Write(-1);
                     Jnwf.Utils.Log.Logger.Log4Net.Error("regisetered:" + ex.Data + "|" + ex.Message);
                 }
             }
             else
             {
                 Response.Write(1);
             }
         }
         else
         {
             //MessageBox.ShowMsg(this, "验证码错误或已失效");
             Response.Write(-2);
         }
     }
     else
     {
         //MessageBox.ShowMsg(this, "验证码错误或已失效!");
         Response.Write(-2);
     }
 }
コード例 #9
0
    protected override void BasePage_Load(AutoRepair.Entity.tb_UsersEntity user)
    {
        IList <AutoRepair.Entity.tb_CarsEntity> list = AutoRepair.BLL.tb_CarsBLL.GetInstance().Gettb_CarsUserIdList(user.UserId);

        if (list != null && list.Count > 0)
        {
            rptlistcar.DataSource = list;
            rptlistcar.DataBind();
            num = 1;
        }
        else
        {
            num = 0;
        }
    }
コード例 #10
0
 protected override void BasePage_Load(AutoRepair.Entity.tb_UsersEntity user)
 {
     if (user != null)
     {
         AutoRepair.Entity.T_RepairUnitEntity repairunite = AutoRepair.BLL.T_RepairUnitBLL.GetInstance().GetAdminSingle(unitId);
         if (repairunite != null)
         {
             unitName = repairunite.UnitName;
             phone    = repairunite.Phone;
         }
         userId = user.UserId;
     }
     else
     {
         Response.Redirect("../Registered.aspx");
     }
 }
コード例 #11
0
 protected override void BasePage_Load(AutoRepair.Entity.tb_UsersEntity user)
 {
     userid = user.UserId;
 }