Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        OfficerLogic pl = new OfficerLogic();
        DataTable    dt = pl.SelectAll();

        Repeater1.DataSource = dt;
        Repeater1.DataBind();
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Officer ao = new Officer();

        ao.AllocationTime = DateTime.Now;
        ao.EmailId        = txtEmailID.Text;
        ao.MobileNo       = txtMobile.Text;
        ao.Name           = txtName.Text;
        ao.Password       = txtPassword.Text;
        ao.ProjectID      = 0;
        ao.Username       = txtUsername.Text;

        OfficerLogic ol = new OfficerLogic();

        ol.Insert(ao);

        Response.Redirect("ManageOfficer.aspx");
    }
Пример #3
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        Officer o = new Officer();

        o.Name           = txtName.Text;
        o.MobileNo       = txtMobile.Text;
        o.EmailId        = txtEmailID.Text;
        o.Password       = "";
        o.ProjectID      = 0;
        o.Username       = "";
        o.AllocationTime = DateTime.Now;


        OfficerLogic ol = new OfficerLogic();

        ol.Insert(o);

        Response.Redirect("OfficerDetail.aspx");
    }