Ejemplo n.º 1
0
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            CARREGDETAILDTO carRegDetail = new CARREGDETAILDTO();

            carRegDetail.Email   = txtEmail.Text;
            carRegDetail.EmpId   = txtEmpId.Text;
            carRegDetail.From    = txtFrom.Text;
            carRegDetail.To      = txtTo.Text;
            carRegDetail.InTime  = txtInTime.Text;
            carRegDetail.OutTime = txtOutTime.Text;
            carRegDetail.Via     = txtVia.Text;
            CarPoolingBLL bll = new CarPoolingBLL();

            bll.insertRegistrationDetails(carRegDetail);
        }
        public void insertRegistrationDetails(CARREGDETAILDTO detail)
        {
            VDSI_CARPEntities entities  = VDSI_CARPEntities.createInstance();
            CARREGDETAIL      regDetail = new CARREGDETAIL();

            regDetail.EmpId   = detail.EmpId;
            regDetail.Email   = detail.Email;
            regDetail.From    = detail.From;
            regDetail.To      = detail.To;
            regDetail.InTime  = detail.InTime;
            regDetail.OutTime = detail.OutTime;
            regDetail.Status  = true;
            regDetail.Via     = detail.Via;
            entities.CARREGDETAILS.Add(regDetail);
            entities.SaveChanges();
        }