public int Adminlogin(Businessobjects.BusinessObjectsclass objbo)
 {
     if (objbo.Username == "Admin" && objbo.Password == "naveen")
     {
         return(1);
     }
     else
     {
         return(0);
     }
     #endregion
 }
Beispiel #2
0
        public int DeleteDestinationpoint(Businessobjects.BusinessObjectsclass objbo)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());

            con.Open();
            SqlCommand cmd = new SqlCommand("proc_deletedestinationpoint", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@did", objbo.Did);
            int i = cmd.ExecuteNonQuery();

            return(i);
        }
Beispiel #3
0
        public int Addbuspickuppoints(Businessobjects.BusinessObjectsclass objbo)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());

            con.Open();
            SqlCommand cmd = new SqlCommand("proc_addbuspickuppoint", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@svno", objbo.Serviceno);
            cmd.Parameters.AddWithValue("@pid", objbo.pid);
            int i = cmd.ExecuteNonQuery();

            return(i);
        }
Beispiel #4
0
        public DataSet Bindpointsbasedonserviceno(Businessobjects.BusinessObjectsclass objbo)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());

            con.Open();
            SqlCommand cmd = new SqlCommand("proc_bindpointsbasedonsvno", con);

            cmd.CommandType = CommandType.StoredProcedure;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet        ds = new DataSet();

            cmd.Parameters.AddWithValue("@svno", objbo.Serviceno);
            da.Fill(ds, "destination");
            return(ds);
        }
Beispiel #5
0
        private void Bindpointsbasedonsvno()
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            string s = DropDownList1.SelectedItem.ToString();

            string[] s1 = s.Split('/');
            objbo.Serviceno = s1[0].ToString();
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            DataSet ds = objbll.Bindpointsbasedonserviceno(objbo);

            DropDownList2.DataSource     = ds;
            DropDownList2.DataValueField = "dname";
            DropDownList2.DataBind();
            DropDownList3.DataSource     = ds;
            DropDownList3.DataValueField = "dname";
            DropDownList3.DataBind();
        }
Beispiel #6
0
        public int Addfaredestination(Businessobjects.BusinessObjectsclass objbo)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());

            con.Open();
            SqlCommand cmd = new SqlCommand("proc_addfaredestination", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@svno", objbo.Serviceno);
            cmd.Parameters.AddWithValue("@fdid", objbo.Fdid);
            cmd.Parameters.AddWithValue("@fdeptime", objbo.Fdeptime);
            cmd.Parameters.AddWithValue("@tdid", objbo.Tdid);
            cmd.Parameters.AddWithValue("@tdeptime", objbo.Tdeptime);
            cmd.Parameters.AddWithValue("@fare", objbo.Fare);
            int i = cmd.ExecuteNonQuery();

            return(i);
        }
 protected void Button1_Click(object sender, EventArgs e)
 {
     foreach (GridViewRow row in GridView1.Rows)
     {
         CheckBox c1 = (CheckBox)row.FindControl("CheckBox1");
         if (c1.Checked == true)
         {
             Label l1 = (Label)row.FindControl("Label1");
             Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
             objbo.Did = l1.Text.ToString();
             string   s  = DropDownList1.SelectedItem.ToString();
             string[] s1 = s.Split('/');
             objbo.Serviceno = s1[0].ToString();
             Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
             objbll.AddbusDestinationpoints(objbo);
         }
     }
 }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.pid   = txtpid.Text;
            objbo.pname = txtpname.Text;
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.Addpickuppoint(objbo);

            if (i == 1)
            {
                Response.Write("ADDED");
                txtpname.Text = "";
                AutogeneratePid();
            }
            else
            {
                Response.Write("FAILED");
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Businessobjects.BusinessObjectsclass objbo = new Businessobjects.BusinessObjectsclass();
            objbo.Did   = TextBox1.Text;
            objbo.Dname = TextBox1.Text;
            Businesslogiclayer.Businesslogiclayerclass objbll = new Businesslogiclayer.Businesslogiclayerclass();
            int i = objbll.Adddestinationpoint(objbo);

            if (i == 1)
            {
                TextBox2.Text = "";
                string s = objbll.AutogenerateDid();
                TextBox1.Text = s;
                Response.Write("Record inserted");
            }
            else
            {
                Response.Write("failed");
            }
        }
Beispiel #10
0
        public int EditBus(Businessobjects.BusinessObjectsclass objbo)
        {
            SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());

            con.Open();
            SqlCommand cmd = new SqlCommand("proc_editbus", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@svno", objbo.Serviceno);
            cmd.Parameters.AddWithValue("@fromplace", objbo.Fromplace);
            cmd.Parameters.AddWithValue("@toplace", objbo.Toplace);
            cmd.Parameters.AddWithValue("@capacity", objbo.Capacity);
            cmd.Parameters.AddWithValue("@arrivaltime", objbo.Arrivaltime);
            cmd.Parameters.AddWithValue("@depaturetime", objbo.Depaturetime);
            cmd.Parameters.AddWithValue("@tagencyname", objbo.Travelagencyname);
            cmd.Parameters.AddWithValue("@bustype", objbo.bustype);
            int i = cmd.ExecuteNonQuery();

            return(i);
        }
        public int Addbus(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.Addbus(objbo);

            return(i);
        }
        public int Deletepickuppoint(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.Deletepickuppoint(objbo);

            return(i);
        }
        public int UpdateDestination(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.UpdateDestination(objbo);

            return(i);
        }
        public int DeleteDestinationpoint(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.DeleteDestinationpoint(objbo);

            return(i);
        }
        public int AddbusDestinationpoints(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.AddbusDestinationpoints(objbo);

            return(i);
        }
        public DataSet Bindpointsbasedonserviceno(Businessobjects.BusinessObjectsclass objbo)
        {
            DataSet ds = objdal.Bindpointsbasedonserviceno(objbo);

            return(ds);
        }
        public int Editbus(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.EditBus(objbo);

            return(i);
        }
        public int DeleteBus(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.DeleteBus(objbo);

            return(i);
        }
        public int Addfaredestination(Businessobjects.BusinessObjectsclass objbo)
        {
            int i = objdal.Addfaredestination(objbo);

            return(i);
        }