Ejemplo n.º 1
0
 /// <summary>
 /// 来源绑定
 /// </summary>
 protected void MyBind()
 {
     B_Source bsource = new B_Source();
     DataTable dt = bsource.GetSourceAll();
     RepFiles.DataSource = dt;
     RepFiles.DataBind();
 }
Ejemplo n.º 2
0
    protected void EBtnModify_Click(object sender, EventArgs e)
    {
        M_Source msource = new M_Source();
        B_Source bsource = new B_Source();
        msource.SourceID = Convert.ToInt32(Request.QueryString["SId"].Trim());
        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.Update(msource))
        {
            Response.Write("<script language=javascript> alert('修改成功!');window.document.location.href='SourceManage.aspx';</script>");
        }
    }
Ejemplo n.º 3
0
 private void DeleteSource(string SId)
 {
     B_Source bsource = new B_Source();
     if (bsource.DeleteByID(SId))
     {
         HttpContext.Current.Response.Write("<script language=javascript> alert('删除成功!');window.document.location.href='SourceManage.aspx';</script>");
     }
 }
Ejemplo n.º 4
0
 public void MyBind()
 {
     B_Source bsource = new B_Source();
     GridView1.DataSource =bsource.GetSourceAll();// GetAuthorPage(0, 0, 10);
     GridView1.DataBind();
 }
Ejemplo n.º 5
0
 private void InItModify(int Sid)
 {
     B_Source bsource = new B_Source();
     M_Source msource = bsource.GetSourceByid(Sid);
     TxtName.Text = msource.Name;
     TxtAddress.Text = msource.Address;
     TxtTel.Text = msource.Tel;
     TxtFax.Text = msource.Fax;
     TxtContacterName.Text = msource.Contacter;
     TxtHomePage.Text = msource.HomePage;
     txtpic.Text = msource.Photo;
     showphoto.Src ="../../"+msource.Photo;
     TxtZipCode.Text = msource.ZipCode.ToString();
     TxtEmail.Text = msource.Email;
     TxtMail.Text = msource.Mail;
     TxtIm.Text = msource.Im;
     TxtType.Text = "";//来源的分类是否为绑定?
     if (msource.IsElite)
         ChkElite.Checked = true;
     else
         ChkElite.Checked = false;
     if (msource.onTop)
     {
         ChkOnTop.Checked = true;
     }
     else
     {
         ChkOnTop.Checked = false;
     }
     ChkPass.Text = msource.Intro;
     if (msource.Passed)
     {
         ChkPass.Checked = true;
     }
     else
     {
         ChkPass.Checked = false;
     }
     EBtnModify.Visible = true;
     EBtnSubmit.Visible = false;
 }