示例#1
0
        public void TestMethod1()
        {
            CarPoolingBLL bll    = new CarPoolingBLL();
            string        result = bll.getLoginDetails("Arun", "Arun");

            Assert.AreEqual(result, "1234");
        }
示例#2
0
        public void TestMethod3()
        {
            CarPoolingBLL bll    = new CarPoolingBLL();
            string        strsql = "exec [ViewCarPoolingDetails] '','',''";

            Assert.AreEqual(bll.ViewPoolingDetails(strsql).Tables[0].Columns.Count, 12);
            //   Assert.AreEqual( ds.Tables[0].Columns.Count,12);
        }
示例#3
0
        public void BindGrid()
        {
            VDSI_EmpCarPooling_BLL.CarPoolingBLL objBll = new CarPoolingBLL();

            string  strsql = "exec [ViewCarPoolingDetails] '" + txtStPoint.Text + "','" + txtEndPoint.Text + "','" + txtTime.Text + "'";
            DataSet ds     = objBll.ViewPoolingDetails(strsql);

            grdView.DataSource = ds;
            grdView.DataBind();
        }
示例#4
0
        public void Bindgrid()
        {
            string strsql = "exec ViewPoolingRequest '" + ddlStatus.SelectedValue + "'";

            VDSI_EmpCarPooling_BLL.CarPoolingBLL objBll = new CarPoolingBLL();
            DataSet ds = objBll.ViewPoolingDetails(strsql);

            grdView.DataSource = ds;
            grdView.DataBind();
        }
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            CarPoolingBLL carPoolingBll = new CarPoolingBLL();

            string strsql = "exec InsertRegDetails '" + Session["EmpId"].ToString() + "','" + txtEmail.Text + "','" + txtFrom.Text + "','" + txtTo.Text + "','" + txtVia.Text + "','" + txtInTime.Text + "','" + txtOutTime.Text + "','" + txtseats.Text + "'";

            carPoolingBll.insertRegistrationDetails(strsql);

            lblMsg.Text = "Registration is Succesfully";
            //   Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"test","javascript:alert(created Sucessfully)","window.location:Close();",1)
        }
示例#6
0
 public void TestMethod4()
 {
     try
     {
         CarPoolingBLL bll = new CarPoolingBLL();
         bll.insertRegistrationDetails("exec InsertRegDetails '1234','a4@ggs','porur','guindy','ramapuram','10','11','1'");
     }
     catch
     {
         Assert.Fail();
     }
 }
示例#7
0
        protected void grdView_RowEditing(object sender, GridViewEditEventArgs e)
        {
            GridViewRow row    = grdView.Rows[e.NewEditIndex];
            int         RespId = Convert.ToInt32(((Label)row.Cells[1].FindControl("lblReqId")).Text);

            string strsql = " update poolingrequest set status =2 where id= " + RespId;

            CarPoolingBLL carPoolingBll = new CarPoolingBLL();

            carPoolingBll.ViewPoolingDetails(strsql);

            lblMsg.Text = "Record has been Approved";
        }
示例#8
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);
        }
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtPassword.Text))
     {
         CarPoolingBLL carPoolingBll = new CarPoolingBLL();
         string        empId         = carPoolingBll.getLoginDetails(txtUserName.Text, txtPassword.Text);
         if (!string.IsNullOrEmpty(empId))
         {
             Session["EmpId"] = empId;
             Response.Redirect("Menupage.aspx");
         }
         else
         {
             ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Notification : Invalid Username Or Password.');", true);
         }
     }
 }
示例#10
0
        protected void grdView_RowEditing(object sender, GridViewEditEventArgs e)
        {
            GridViewRow row    = grdView.Rows[e.NewEditIndex];
            int         RespId = Convert.ToInt32(((Label)row.Cells[1].FindControl("lblReqId")).Text);

            string RespPerson   = ((TextBox)row.Cells[5].FindControl("txtName")).Text;
            string RespSeat     = ((TextBox)row.Cells[6].FindControl("txtSeats")).Text;
            string RespBoarding = ((TextBox)row.Cells[7].FindControl("txtBoarding")).Text;
            string RespNo       = ((TextBox)row.Cells[7].FindControl("txtNo")).Text;


            string strsql = "exec InsertPoolingRequest " + RespId + ",'1234','" + RespSeat + "','" + RespBoarding + "','" + RespNo + "','" + RespPerson + "'";

            CarPoolingBLL carPoolingBll = new CarPoolingBLL();

            carPoolingBll.insertRegistrationDetails(strsql);
        }