Beispiel #1
0
        public List <VisitBill> HisVisit(string userName)
        {
            string cookies = HttpContext.Current.Request.Cookies["guid"] == null ? "" : HttpContext.Current.Request.Cookies["guid"].Value as string;
            string session = Session.SessionID.ToString();

            if (!cookies.Equals(session))
            {
                return(null);
            }
            MLogin.GetExeUname();
            clientservice_VisitBill        bills = new clientservice_VisitBill();
            List <clientservice_VisitBill> list  = bills.Select(" and billman='" + userName + "' order by id desc ", " top 20 client,billdate,notepre,code");
            List <VisitBill> history             = new List <VisitBill>();

            foreach (clientservice_VisitBill c in list)
            {
                VisitBill b = new VisitBill();
                b.code    = c.CODE;
                b.client  = c.CLIENT;
                b.date    = c.BILLDATE.ToString("yyyy-MM-dd");
                b.content = c.NOTEPRE;
                history.Add(b);
            }
            return(history);
        }
Beispiel #2
0
        public List <VisitBill> GetBills(string userName)
        {
            string cookies = HttpContext.Current.Request.Cookies["guid"] == null ? "" : HttpContext.Current.Request.Cookies["guid"].Value as string;
            string session = Session.SessionID.ToString();

            if (!cookies.Equals(session))
            {
                return(null);//身份验证失败
            }
            MLogin.GetExeUname();
            List <VisitBill>               result = new List <VisitBill>();
            string                         date   = DateTime.Now.Date.ToString();
            clientservice_VisitBill        bills  = new clientservice_VisitBill();
            List <clientservice_VisitBill> list   = bills.Select(" and billman='" + userName + "' and  BILLDATE='" + date + "'  ", " client,billdate,notepre,code,zf3,zf4,zf5 ");//公司、拜访时间、内容、单号、名字、职位、电话

            foreach (clientservice_VisitBill b in list)
            {
                VisitBill v = new VisitBill();
                v.client      = b.CLIENT;
                v.code        = b.CODE;
                v.content     = b.NOTEPRE;
                v.date        = b.BILLDATE.ToString("yyyy-MM-dd");
                v.hisname     = b.ZF3;
                v.hisposition = b.ZF4;
                v.hisphone    = b.ZF5;
                result.Add(v);
            }
            return(result);
        }
Beispiel #3
0
        public void EditVisit(string code, string content)
        {
            string cookies = HttpContext.Current.Request.Cookies["guid"] == null ? "" : HttpContext.Current.Request.Cookies["guid"].Value as string;
            string session = Session.SessionID.ToString();

            if (!cookies.Equals(session))
            {
                return;
            }
            MLogin.GetExeUname();
            clientservice_VisitBill        bills = new clientservice_VisitBill();
            List <clientservice_VisitBill> list  = bills.Select(" and  code='" + code + "'");

            if (list.Count > 0)
            {
                clientservice_VisitBill bill = list[0];
                bill.Reset_clientservice_VisitBill();
                bill.NOTEPRE = content;
                // bill.FINISHDATE= SysTime.GetTime;
                bill.Updata(" and code='" + code + "' ");
            }
        }