示例#1
0
        /// <summary>
        /// 获取客户和联系人姓名
        /// </summary>
        /// <param name="guid"></param>
        /// <param name="fp"></param>
        /// <param name="follow"></param>
        private static void get_customer_linkman(string guid, follow_up fp, follow follow)
        {
            try
            {
                #region 获取客户信息\联系人

                //联系人列表,当前用户
                List <cust_linkman> cust_linkman_selfs = cust_linkman_handle.list_All;

                //获取联系人信息
                string link_id      = fp.follow_link_id.ToString();
                long   link_id_long = Convert.ToInt64(link_id);
                //获取指定的客户【在自己的客户列表里获取】
                cust_linkman cust_linkman = (from t in cust_linkman_selfs
                                             where t.id == link_id_long
                                             select t).FirstOrDefault(); if (cust_linkman != null)
                {
                    follow.follow_up_info.follow_cust_name = cust_linkman.link_cust_name;
                    follow.follow_up_info.follow_link_name = cust_linkman.link_name;
                }

                #endregion
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
            finally
            {
            }
        }
示例#2
0
    IEnumerator moveRestart()
    {
        Vector3 start       = r.transform.position;
        Vector3 end         = new Vector3(0f, transform.position.y - 2.8f, 0f);
        float   elapsedTime = 0f;

        while (elapsedTime < totalTime + 1)
        {
            start = new Vector3(0, transform.position.y - 6, 0);
            end   = new Vector3(0f, transform.position.y + 2.8f, 0f);
            r.transform.position = Vector3.Lerp(start, end, elapsedTime / (totalTime + 1));
            elapsedTime         += Time.deltaTime;
            yield return(null);
        }
        r.transform.position = new Vector3(0f, transform.position.y + 2.8f, 0f);

        follow fol = r.AddComponent <follow>();

        fol.followThis = gameObject;
        fol.offset     = -2.8f;
        fol.gameOver   = false;
        yield return(new WaitForSeconds(.05f));

        gamePanel.SetActive(false);
        gameOverPanel.SetActive(true);
        finalScore.text = "Final Score: " + PlayerPrefs.GetInt("Score", -1);
    }
示例#3
0
    protected void followBtn_Click(object sender, EventArgs e)
    {
        using (var context = new rheaxuEntities())
        {
            string followTxt = followBtn.Text;
            string ownername = Request["ownername"];
            if (followTxt == "Follow")
            {
                follow f = new follow {
                    username = ownername, follower = User.Identity.Name
                };
                context.follows.Add(f);
                context.SaveChanges();
                followBtn.CssClass = "orange btn-sm";
                followBtn.Text     = "Unfollow";
            }
            else
            {
                var f = (from s in context.follows where s.username == ownername && s.follower == User.Identity.Name select s).FirstOrDefault();
                context.follows.Remove(f);
                context.SaveChanges();
                followBtn.CssClass = "blue btn-sm";
                followBtn.Text     = "Follow";
            }

            var follows = (from s in context.follows where s.username == ownername select s).Count();
            followerCountLabel.Text = follows.ToString() + " followers";
        }
    }
示例#4
0
    private void InitCtrl(GameObject playerObj)
    {
        // testMove move = playerObj.GetComponent<testMove>();

        // ETCJoystick j = ETCInput.GetControlJoystick("MyJoystick");
        // // ETCTouchPad t = ETCInput.GetControlTouchPad("TouchPad");

        // ETCButton b2 = ETCInput.GetControlButton("AttackBtn");
        // b2.onDown.AddListener(move.OnAttack);
        // j.onMove.AddListener(move.OnMove);
        // j.onMoveEnd.AddListener(move.OnMoveEnd);
        PlayerCtrl  PlayerCtrl = playerObj.AddComponent <PlayerCtrl>();
        ETCJoystick j          = ETCInput.GetControlJoystick("MyJoystick");
        // ETCTouchPad t = ETCInput.GetControlTouchPad("TouchPad");

        ETCButton b2 = ETCInput.GetControlButton("AttackBtn");

        b2.onDown.AddListener(PlayerCtrl.OnAttack);
        j.onMove.AddListener(PlayerCtrl.OnMove);
        j.onMoveEnd.AddListener(PlayerCtrl.OnMoveEnd);

        // playerObj.transform.position = Camera.main.transform.parent.position;
        // playerObj.transform.parent = Camera.main.transform.parent;

        follow    f           = Camera.main.GetComponent <follow>();
        Transform cameraPoint = TransformHelper.GetChild(playerObj.transform, "cameraPoint");

        f.SetTarget(cameraPoint.gameObject);
        littleMapCamera subCamera = GameObject.FindGameObjectWithTag("LittleMapCamera").GetComponent <littleMapCamera>();

        subCamera.SetTarget(cameraPoint.gameObject);
    }
        public IActionResult followUser(string fansId, string followId)
        {
            var follow = context.follow.FirstOrDefault(f => f.fans_id == fansId && f.follow_id == followId);

            if (follow != null)
            {//已经关注,则取消关注
                context.follow.Remove(follow);
                context.SaveChanges();
            }
            else
            {
                follow = new follow
                {
                    fans_id   = fansId,
                    follow_id = followId
                };
                context.follow.Add(follow);
                context.SaveChanges();
            }
            return(Ok(new
            {
                Success = true,
                msg = "Operation Done"
            }));
        }
示例#6
0
        public ActionResult DeleteConfirmed(int id)
        {
            follow follow = db.follow.Find(id);

            db.follow.Remove(follow);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#7
0
        public ActionResult DelfollowAniSure(int id)
        {
            follow follow = db.follow.Find(id);

            db.follow.Remove(follow);
            db.SaveChanges();
            return(RedirectToAction("Index", "Manage"));
        }
示例#8
0
    public override void OnInspectorGUI()
    {
        follow myTarget = (follow)target;

        myTarget.target = (GameObject)EditorGUILayout.ObjectField("Target :", myTarget.target, typeof(GameObject), true);

        myTarget.offsetType = (follow.Direction)EditorGUILayout.EnumPopup("Offset Type :", myTarget.offsetType);
        if (myTarget.offsetType != follow.Direction.None)
        {
            myTarget.offset = EditorGUILayout.Vector3Field("Offset :", myTarget.offset);
        }



        myTarget.followPosition = EditorGUILayout.Toggle("Follow Position", myTarget.followPosition);
        if (myTarget.followPosition)
        {
            GUILayout.BeginHorizontal(GUILayout.Width(10));

            GUILayout.Space(10);
            GUILayout.Label("X :");
            myTarget.positionX = GUILayout.Toggle(myTarget.positionX, GUIContent.none);
            GUILayout.Label("Y :");
            myTarget.positionY = GUILayout.Toggle(myTarget.positionY, GUIContent.none);
            GUILayout.Label("Z :");
            myTarget.positionZ = GUILayout.Toggle(myTarget.positionZ, GUIContent.none);

            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal(GUILayout.Width(5));
            GUILayout.Space(10);
            GUILayout.Label("Smooth Damp :");
            myTarget.smoothDamp = GUILayout.Toggle(myTarget.smoothDamp, GUIContent.none);
            if (myTarget.smoothDamp)
            {
                myTarget.smoothTime = EditorGUILayout.FloatField("Smooth Time :", myTarget.smoothTime);
            }
            GUILayout.EndHorizontal();
        }
        myTarget.followRotation = EditorGUILayout.Toggle("Follow Rotation", myTarget.followRotation);
        if (myTarget.followRotation)
        {
            GUILayout.BeginHorizontal(GUILayout.Width(10));
            GUILayout.Space(10);
            GUILayout.Label("X :");
            myTarget.rotationX = GUILayout.Toggle(myTarget.rotationX, GUIContent.none);
            GUILayout.Label("Y :");
            myTarget.rotationY = GUILayout.Toggle(myTarget.rotationY, GUIContent.none);
            GUILayout.Label("Z :");
            myTarget.rotationZ = GUILayout.Toggle(myTarget.rotationZ, GUIContent.none);

            GUILayout.EndHorizontal();
        }
    }
示例#9
0
 public ActionResult Edit([Bind(Include = "followID,follow_userId,follow_animalID")] follow follow)
 {
     if (ModelState.IsValid)
     {
         db.Entry(follow).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.follow_animalID = new SelectList(db.animalData, "animalID", "animalKind", follow.follow_animalID);
     ViewBag.follow_userId   = new SelectList(db.AspNetUsers, "Id", "Email", follow.follow_userId);
     return(View(follow));
 }
示例#10
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    public void Start()
    {
        bool wasGrounded = m_Grounded;

        m_Grounded = false;

        anim   = GetComponent <Animator>();
        rb     = GetComponent <Rigidbody2D>();
        follow = GetComponent <follow>();

        player = GameObject.FindGameObjectWithTag("Player").transform;
    }
示例#11
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetButtonDown("Fire1")) // Call dog 1
        {
            //if (followStack.Count > 0)
            //{
            //    GameObject dog = followStack.Pop();
            //    sit dogSit = dog.GetComponent<sit>();
            //    follow dogFollow = dog.GetComponent<follow>();
            //    //if (!dogSit.isSitting)
            //    //{
            //    dogSit.isSitting = true;
            //    dogFollow.isFollowing = false;
            //    //}
            //    sitStack.Push(dog);
            //}

            foreach (GameObject dog in dogs)
            {
                follow follow = dog.GetComponent <follow>();
                if (follow.alphaWolf)
                {
                    follow.goTo(transform.position);
                }
            }
        }
        if (Input.GetButtonDown("Fire2")) // Call dog 2
        {
            //if (sitStack.Count > 0)
            //{
            //    GameObject dog = sitStack.Pop();
            //    sit dogSit = dog.GetComponent<sit>();
            //    follow dogFollow = dog.GetComponent<follow>();
            //    //if (!dogSit.isSitting)
            //    //{
            //    dogSit.isSitting = false;
            //    dogFollow.isFollowing = true;
            //    //}
            //    followStack.Push(dog);
            //}

            foreach (GameObject dog in dogs)
            {
                follow follow = dog.GetComponent <follow>();
                if (!follow.alphaWolf)
                {
                    follow.goTo(transform.position);
                }
            }
        }
    }
示例#12
0
        // GET: follows/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            follow follow = db.follow.Find(id);

            if (follow == null)
            {
                return(HttpNotFound());
            }
            return(View(follow));
        }
示例#13
0
        //追蹤清單刪除
        public ActionResult DelfollowAni(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            follow follow = db.follow.Find(id);

            if (follow == null)
            {
                return(HttpNotFound());
            }
            return(RedirectToAction("Index", "Manage"));
        }
示例#14
0
        // GET: follows/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            follow follow = db.follow.Find(id);

            if (follow == null)
            {
                return(HttpNotFound());
            }
            ViewBag.follow_animalID = new SelectList(db.animalData, "animalID", "animalKind", follow.follow_animalID);
            ViewBag.follow_userId   = new SelectList(db.AspNetUsers, "Id", "Email", follow.follow_userId);
            return(View(follow));
        }
示例#15
0
        /// <summary>
        /// 获取图片评论和点赞
        /// </summary>
        /// <param name="fp"></param>
        /// <param name="follow"></param>
        private static void get_picture_praise_comment(follow_up fp, follow follow)
        {
            try
            {
                #region 获取图片

                if (Constant.list_picture_All != null)
                {
                    //获取指定的图片【类型 和ID】
                    List <picture> list_picture = (from t in Constant.list_picture_All
                                                   where t.pic_en_table == "follow_up" && t.pic_table_id == (int)fp.id
                                                   select t).ToList();
                    follow.picture = ConverList <picture> .ListToDic(list_picture);
                }

                #endregion

                #region 获取评论

                //获取指定的评论
                List <comment> list_comment = (from t in comment_handle.list_All
                                               where t.com_table_id == (int)fp.id && t.com_isdelete == "0" && t.com_type == "1"
                                               select t).ToList();
                follow.comment = ConverList <comment> .ListToDic(list_comment);

                #endregion

                #region 获取点赞人

                List <praise> list_praise = (from t in praise_handle.list_All
                                             where t.praise_table_id == (int)fp.id && t.praise_type == "1"
                                             select t).ToList();
                follow.praise = ConverList <praise> .ListToDic(list_praise);

                #endregion
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
            }
            finally
            {
            }
        }
示例#16
0
        public ActionResult followCreate([Bind(Include = "followID,follow_userId,follow_animalID")] follow follow)
        {
            if (ModelState.IsValid)
            {
                db.follow.Add(follow);
                try
                {
                    db.SaveChanges();
                    return(RedirectToAction("oneAni", "aniData", new { id = follow.follow_animalID }));
                }
                catch (Exception e)
                {
                    return(RedirectToAction("oneAni", "aniData", new { id = follow.follow_animalID }));
                }
            }

            ViewBag.follow_animalID = new SelectList(db.animalData, "animalID", "animalKind", follow.follow_animalID);
            ViewBag.follow_userId   = new SelectList(db.AspNetUsers, "Id", "Email", follow.follow_userId);
            return(RedirectToAction("oneAni", "aniData", new { id = follow.follow_animalID }));
        }
示例#17
0
        /// <summary>
        /// 获取跟进记录列表
        /// </summary>
        /// <param name="context"></param>
        public void get_follow_up_list(HttpContext context, string guid)
        {
            HttpRequest Request = context.Request;

            try
            {
                //缓存应用
                if (Data_check_helper.check_Self(handertype, guid))
                {
                    //是否分页
                    bool ispage = RequestHelper.bool_transfer(Request, "ispage");
                    //每一页包含的数量
                    int PageSize = RequestHelper.int_transfer(Request, "PageSize");
                    //第几页
                    int PageIndex = RequestHelper.int_transfer(Request, "PageIndex");

                    //封装到PagedDataModel的元数据
                    List <follow> follow_List = new List <follow>();

                    //跟进客户的客户ID
                    int follow_cust_id = RequestHelper.int_transfer(Request, "follow_cust_id");
                    //跟进客户的联系人ID
                    int link_l_id = RequestHelper.int_transfer(Request, "link_id");
                    //筛选日期
                    string riqi = RequestHelper.string_transfer(Request, "riqi");

                    //我的跟进GUID
                    string is_self_guid = RequestHelper.string_transfer(Request, "is_self_guid");

                    //部门的ID号【传参 】
                    string departmentID = RequestHelper.string_transfer(Request, "departmentID");
                    string memmberID    = RequestHelper.string_transfer(Request, "memmberID");

                    var data_list = from t in dic_Self[guid] select t;

                    data_list = Check_And_Get_List_dep(departmentID, memmberID, data_list);

                    List <follow_up> follow_ups = GetPage_Helper(data_list, follow_cust_id, link_l_id, riqi, is_self_guid).ToList();

                    int follow_count = follow_ups.Count;
                    follow_ups = follow_ups.Skip((PageIndex - 1) * PageSize).Take(PageSize).ToList();

                    //数据对应
                    foreach (var fp in follow_ups)
                    {
                        //跟进记录(对应页面的实体类型)
                        follow follow = new follow();
                        //评论数量
                        int list_praise_count = praise_handle.list_All.Count(t => t.praise_table_id == (long)fp.id && t.praise_userid == guid && t.praise_type == "1");
                        //是否包含评论
                        string is_praise = list_praise_count > 0 ? "1" : "0";

                        //附件跟进记录(对应页面的实体类型【通过数据库映射填充实体所需部分信息】)
                        int picture_count = 0;
                        if (Constant.list_picture_All != null)
                        {
                            //获取指定的图片【类型 和ID】
                            picture_count = Constant.list_picture_All.Count(t => t.pic_en_table == "follow_up" && t.pic_table_id == Convert.ToInt32(fp.id));
                        }
                        follow.follow_up_info = new follow_up_info()
                        {
                            follow_content  = fp.follow_content,
                            follow_cust_id  = (long)fp.follow_cust_id,
                            follow_date     = ((DateTime)fp.follow_date).ToString("yyyy-MM-dd"),
                            follow_link_id  = (long)fp.follow_link_id,
                            follow_username = fp.follow_username,
                            is_praise       = is_praise,
                            id                = (long)fp.id,
                            picture_count     = picture_count,
                            follow_createdate = Convert.ToString(fp.follow_createdate),
                        };

                        //获取跟进类型
                        string type_string = Convert.ToString(fp.follow_type);
                        if (!string.IsNullOrEmpty(type_string) && pub_param_handle.dic_follow_Level.ContainsKey(type_string))
                        {
                            follow.follow_up_info.follow_type = pub_param_handle.dic_follow_Level[type_string];
                        }


                        //获取客户和联系人
                        get_customer_linkman(guid, fp, follow);
                        //获取图片评论和点赞
                        get_picture_praise_comment(fp, follow);
                        follow_List.Add(follow);
                    }

                    //返回数据
                    PagedDataModel <follow> psd = new PagedDataModel <follow>()
                    {
                        PagedData = follow_List,
                        PageIndex = PageIndex,
                        PageSize  = PageSize,
                        RowCount  = follow_count
                    };
                    //数据包(json格式)
                    jsonModel = new JsonModel()
                    {
                        errNum = 0, errMsg = "success", retData = psd
                    };
                }
            }
            catch (Exception ex)
            {
                LogHelper.Error(ex);
                jsonModel = Constant.ErrorGetData(ex.Message);
            }
            finally
            {
                if (Constant.dicLimit_P.ContainsKey(guid))
                {
                    jsonModel.status = "IsAdmin";
                }
                string result = Constant.jss.Serialize(jsonModel);
                context.Response.Write("{\"result\":" + result + "}");
            }
        }
    public void stop()
    {
        follow other = (follow)main_camera.GetComponent(typeof(follow));

        other.stop();
    }