protected void EBtnSubmit_Click(object sender, EventArgs e) { M_Source msource = new M_Source(); B_Source bsource=new B_Source(); msource.Name = TxtName.Text.ToString(); msource.Address = TxtAddress.Text.ToString(); msource.Tel = TxtTel.Text.ToString(); msource.Fax = TxtFax.Text.ToString(); msource.Contacter = TxtContacterName.Text.ToString(); msource.HomePage=TxtHomePage.Text.ToString(); msource.Photo = txtpic.Text.ToString();//../../manage/Images/default.gif msource.ZipCode = DataConverter.CLng(TxtZipCode.Text); msource.Email= TxtEmail.Text.ToString(); msource.Mail = TxtMail.Text.ToString(); msource.Im = TxtIm.Text.ToString(); msource.LastUseTime = DateTime.Now; msource.Type = TxtType.Text.ToString(); if (ChkElite.Checked) { msource.IsElite = true; } else { msource.IsElite=false; } if (ChkOnTop.Checked) { msource.onTop = true; } else { msource.onTop = false; } msource.Intro = ChkPass.Text.ToString(); if (ChkPass.Checked) { msource.Passed = true; } else { msource.Passed = false; } if(bsource.Add(msource)) { Response.Write("<script language=javascript> alert('添加成功!');window.document.location.href='SourceManage.aspx';</script>"); } }