Example #1
0
        protected void databind()
        {
            DataTable dt = new ImportingData(PersonalID).DataList();

            gvList.DataSource = dt;
            gvList.DataBind();
        }
Example #2
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            E_ImportingResult result = new ImportingData(PersonalID).ImportingDB();

            ltSucc.Text      = result.SuccNum.ToString();
            ltFail.Text      = result.FailNum.ToString();
            plResult.Visible = true;
        }
Example #3
0
        protected void databind()
        {
            //读取绑定标题
            DataTable dt = new ImportingData(PersonalID).TitleSource();

            BindDropDownList(ddlName, dt);
            BindDropDownList(ddlAddress, dt);
            BindDropDownList(ddlZipCode, dt);
            BindDropDownList(ddlWebiSite, dt);
            BindDropDownList(ddlLinkman, dt);
            BindDropDownList(ddlPosition, dt);
            BindDropDownList(ddlTel, dt);
            BindDropDownList(ddlMobile, dt);
            BindDropDownList(ddlFax, dt);
            BindDropDownList(ddlEmail, dt);
            BindDropDownList(ddlQQ, dt);
            BindDropDownList(ddlMSN, dt);
            BindDropDownList(ddlRemark, dt);
        }
Example #4
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            List <PFileInfo> list = FileUpload1.Upload();

            if (list == null || list.Count == 1)//==1 上传成功
            {
                string url = list[0].FilePath + list[0].FileAddress;
                bool   b   = new ImportingData(PersonalID).CreateXML(url);
                if (b)
                {
                    System.IO.File.Delete(url);
                    Response.Redirect("ImportingStep2.aspx");
                }
                else
                {
                    Jscript.AlertAndRedirect(this, "操作失败", "ImportingStep1.aspx");
                }
            }
            else
            {
                Jscript.AlertAndRedirect(this, "上传文件失败", "ImportingStep1.aspx");
            }
        }
Example #5
0
        protected void btnNext_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(ddlName.SelectedValue))
            {
                Jscript.ShowMsg("名录名称必须选择", this);
                return;
            }
            if (!CheckDropDownList())
            {
                Jscript.ShowMsg("设置重复,请重新设置", this);
                return;
            }
            //保存设置
            List <E_CorreField> list = new List <E_CorreField>();

            list.Add(new E_CorreField()
            {
                Name = "ClientName", Source = ddlName.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Address", Source = ddlAddress.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "ZipCode", Source = ddlZipCode.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "WebiSite", Source = ddlWebiSite.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Linkman", Source = ddlLinkman.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Position", Source = ddlPosition.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Tel", Source = ddlTel.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Mobile", Source = ddlMobile.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Fax", Source = ddlFax.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Email", Source = ddlEmail.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "QQ", Source = ddlQQ.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "MSN", Source = ddlMSN.SelectedValue
            });
            list.Add(new E_CorreField()
            {
                Name = "Remark", Source = ddlRemark.SelectedValue
            });
            bool b = new ImportingData(PersonalID).SaveConfiguration(list);

            if (b)
            {
                Response.Redirect("ImportingStep3.aspx");
            }
            else
            {
                Jscript.ShowMsg("保存失败", this);
            }
        }