コード例 #1
0
        public List <WXOBJ1> AfterSRepair(string userName, int type)
        {
            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();
            string where = " and  BILLMAN='" + userName + "'  and  zf3 <> ''   and left(code,1) <> '*' ";
            string by = " top 20 * ";

            if (type == 0)
            {
                where += " and  ((zf2=''  and  sz10=0 ) or (zf2<>'" + userName + "'))  order by id desc  ";//未接收
            }
            else if (type == 1)
            {
                where += " and  zf2='" + userName + "'   and   id  in( select zf1 from L_AfterRepair a where not exists(select 1 from L_AfterRepair b where b.refercode = a.refercode and b.id > a.id)  and OPERATE_TYPE = '接受' and BILLMAN ='" + userName + "' ) order by id desc";//处理中
            }
            else if (type == 2)
            {
                where += " and  zf2='" + userName + "'   and   id  in( select zf1 from L_AfterRepair a where not exists(select 1 from L_AfterRepair b where b.refercode = a.refercode and b.id > a.id)  and OPERATE_TYPE = '完结' and BILLMAN ='" + userName + "' )  order by id desc";//维修完成
            }
            else
            {
            }
            List <WXOBJ1> ms = new List <WXOBJ1>();
            clientservice_AfterServiceBill        bill = new clientservice_AfterServiceBill();
            List <clientservice_AfterServiceBill> list = bill.Select(where, by);

            foreach (clientservice_AfterServiceBill c in list)
            {
                WXOBJ1 o = new WXOBJ1();
                o.ID       = c.ID;
                o.CODE     = c.CODE;//维修单号
                o.BILLMAN  = c.BILLMAN;
                o.CLIENT   = c.CLIENT;
                o.BILLTYPE = c.BILLTYPE;
                o.ZF1      = c.ZF1;     //机床编号
                o.NOTEPRE  = c.NOTEPRE; //内容描述(电话回访)
                o.ZF3      = c.ZF3;     //分析描述 初判断
                o.CONTACT  = c.ZF27;
                o.PHONE    = c.ZF28;
                o.ZF5      = c.ZF5;
                ms.Add(o);
            }
            return(ms);
        }
コード例 #2
0
ファイル: 获取单据.cs プロジェクト: KellySKL/VS_SQ
        private void GetWxinfo(IEnumerable <string> Plist)
        {
            string mm = string.Empty;

            foreach (var c in Plist)
            {
                mm += "'" + c + "',";
            }
            if (mm == string.Empty)
            {
                return;
            }
            mm = Ifun.Left(mm, mm.Length - 1);
            clientservice_AfterServiceBill cab = new clientservice_AfterServiceBill();

            Wxinfo = cab.Select(" and code in (" + mm + ")");
        }
コード例 #3
0
        public string WxGet(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();
            string where = " and  BILLMAN='" + userName + "'  and  zf3 <> ''   and left(code,1) <> '*'  ";
            where       += " and  ((zf2=''  and  sz10=0 ) or (zf2<>'" + userName + "'))  ";//未接收
            clientservice_AfterServiceBill        bill = new clientservice_AfterServiceBill();
            List <clientservice_AfterServiceBill> list = bill.Select(where);

            if (list.Count <= 0)
            {
                return(null);//没有未接收消息
            }
            string msg = "您有" + list.Count.ToString() + "条维修单未接收,请尽快处理!";

            return(msg);
        }
コード例 #4
0
        public List <WXOBJ1> NeibuWx(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 <WXOBJ1> ms = new List <WXOBJ1>();
            BILLnouse2    JC = new BILLnouse2();

            string where = "and  BILLTYPE ='售后返厂维修' and (isnull(Paytype,'')<>'')and left(code,1)<>'*' and  (freenum5 is null or freenum5 < 1)";
            List <BILLnouse2> bs  = JC.Select(where, " PAYTYPE ");
            string            str = string.Empty;

            foreach (BILLnouse2 h in bs)
            {
                str += "'" + h.PAYTYPE + "',";
            }
            str = str.Substring(0, str.Length - 1);
            clientservice_AfterServiceBill        bill = new clientservice_AfterServiceBill();
            List <clientservice_AfterServiceBill> list = bill.Select(" and  BILLMAN='" + userName + "'   and code in (" + str + ")");

            foreach (clientservice_AfterServiceBill c in list)
            {
                WXOBJ1 o = new WXOBJ1();
                o.BILLMAN  = c.BILLMAN;
                o.CLIENT   = c.CLIENT;
                o.BILLTYPE = c.BILLTYPE;
                o.ZF1      = c.ZF1;
                ms.Add(o);
            }
            return(ms);
        }