Example #1
0
 public DealForm(VacancyLogic Vlogic, EmployeeLogic Elogic, AppliacntLogic Alogic, DealLogic Dlogic)
 {
     InitializeComponent();
     this.Vlogic = Vlogic;
     this.Elogic = Elogic;
     this.Alogic = Alogic;
     this.Dlogic = Dlogic;
 }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        int       id = Convert.ToInt32(e.CommandArgument);
        DealLogic dl = new DealLogic();
        Deal      d  = dl.SelectByID(id);

        lbldealtitle.Text = d.Title;
        lbldealdesc.Text  = d.Description;
    }
 public DealFacade(IServiceProvider serviceProvider, DealTrackingDbContext dbContext)
 {
     this.DbContext       = dbContext;
     this.DbSet           = this.DbContext.Set <Deal>();
     this.IdentityService = serviceProvider.GetService <IdentityService>();
     this.DealLogic       = serviceProvider.GetService <DealLogic>();
     this.ActivityLogic   = serviceProvider.GetService <ActivityLogic>();
     this.StageFacade     = serviceProvider.GetService <StageFacade>();
     this.StageLogic      = serviceProvider.GetService <StageLogic>();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DealLogic dl = new DealLogic();
         DataTable dt = dl.SelectAll();
         Repeater1.DataSource = dt;
         Repeater1.DataBind();
     }
 }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        DealLogic dl = new DealLogic();
        Deal      d  = new Deal();

        d.Title       = txtdealtitle.Text;
        d.Description = txtdealdesc.Text;

        if (photoupload.HasFile)
        {
            string rpath = "dealspic/" + DateTime.Now.Ticks.ToString() + "_" + photoupload.FileName;
            photoupload.SaveAs(Server.MapPath(rpath));
            d.PhotoPath = rpath;
        }
        else
        {
            d.PhotoPath = "";
        }

        dl.Insert(d);

        Response.Redirect("Deals.aspx");
    }
Example #6
0
 public DealsForm(DealLogic logic)
 {
     InitializeComponent();
     this.logic = logic;
 }