예제 #1
0
        public string SavePath(HttpPostedFileBase file)
        {
            Dictionary<string, string> dic = new Dictionary<string, string>();
            dic.Add("渠道ID", "Id");
            dic.Add("渠道类型(必填)", "Type");
            dic.Add("渠道或者门店名称(必填)", "Name");
            dic.Add("所属代理商(必填)", "AgentID");
            dic.Add("所属省(必填)", "ProvinceID");
            dic.Add("所属市(必填)", "CityID");
            dic.Add("所属区/县(必填)", "CountryID");
            dic.Add("联系人(必填)", "Contact");
            dic.Add("注册手机号码(必填)", "Tel");
            DataTable dt = file.GetDataTable(dic);
            DataTable newDt = new ShopInfoBll().InsertShopInfoFromExcel(LoginUser.UserBasic.EnterpriseID, dt);

            long timer = DateTime.Now.Ticks;
            if (newDt.Rows.Count > 0)
            {
                Session["loadFile"] = newDt;
                return new { status = false }.GetJson();
            }
            return new { status = true }.GetJson();
        }