Exemple #1
0
        //协议单位信息下载,供特定门店下载返回dataset
        public DataSet DSYxydw_download(string yydh, out string csdatatime, out string jsdatatime)
        {
            BLL.Web_Yxydw      B_Yxydw = new BLL.Web_Yxydw();
            Model.Web_Yxydw    M_Yxydw = new Model.Web_Yxydw();
            Model.Yxy_sc_xz_sj M_scsj  = new Model.Yxy_sc_xz_sj();
            BLL.Yxy_sc_xz_sj   B_scsj  = new BLL.Yxy_sc_xz_sj();

            //查询出上次上传时间
            DateTime cstime = Convert.ToDateTime("1800-01-01");

            if (yydh != "" && yydh != null)
            {
                M_scsj = B_scsj.GetModelList("yydh='" + yydh + "'")[0];
                cstime = M_scsj.scsj;
            }
            string  jstime   = DateTime.Now.ToString();
            DataSet DS_Yxydw = new DataSet();

            jsdatatime = jstime;
            csdatatime = cstime.ToString();
            DS_Yxydw   = B_Yxydw.GetList(2000, "yydh<>'" + yydh + "' and (clsj>='" + cstime + "' and clsj<'" + jstime + "' and rx='协议单位') or xzxg='xg'", "id");
            if (DS_Yxydw != null)
            {
                jsdatatime = jstime;
                csdatatime = cstime.ToString();
            }

            return(DS_Yxydw);
        }
Exemple #2
0
        //协议单位信息下载,供特定门店下载返回dataset
        public DataSet DSYxydw_download(string yydh, out string csdatatime, out string jsdatatime)
        {
            BLL.Web_Yxydw      B_Yxydw = new BLL.Web_Yxydw();
            Model.Web_Yxydw    M_Yxydw = new Model.Web_Yxydw();
            Model.Yxy_sc_xz_sj M_scsj  = new Model.Yxy_sc_xz_sj();
            BLL.Yxy_sc_xz_sj   B_scsj  = new BLL.Yxy_sc_xz_sj();

            //查询出上次上传时间
            DateTime cstime = DateTime.Parse(common_app.cssj);

            if (yydh != "" && yydh != null)
            {
                List <Model.Yxy_sc_xz_sj> listModels = B_scsj.GetModelList("yydh='" + yydh + "'");
                if (listModels.Count > 0)
                {
                    M_scsj = listModels[0];
                    cstime = M_scsj.scsj;
                }
                else
                {
                    log.LogHelper.WriteLog("出错,中心服务器找不到yydh为:" + yydh + "配置的初始下载时间记录,");
                    csdatatime = "";
                    jsdatatime = "";
                    return(null);
                }
            }
            string  jstime   = DateTime.Now.ToString();
            DataSet DS_Yxydw = new DataSet();

            jsdatatime = jstime;
            csdatatime = cstime.ToString();
            DS_Yxydw   = B_Yxydw.GetList(2000, "yydh<>'" + yydh + "' and (clsj>='" + cstime + "' and clsj<'" + jstime + "' and rx='协议单位') or xzxg='xg'", "id");
            if (DS_Yxydw != null)
            {
                jsdatatime = jstime;
                csdatatime = cstime.ToString();
            }
            return(DS_Yxydw);
        }