Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mamphekgo Bahula

@Mamphekgo Bahula
About
Posts
38
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Errors while creating a site
    M Mamphekgo Bahula

    Good day i don't understand your answer

    Mamphekgo

    SharePoint help sysadmin announcement

  • Errors while creating a site
    M Mamphekgo Bahula

    Good day I am getting the error below while creating teamsites.what might be a problem

    Failed to call GetTypes on assembly Microsoft.Office.Word.Server, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Method not found: 'Microsoft.Office.Web.Common.ProcessImageInfo Microsoft.Office.Web.Common.EnvironmentAdapters.IImagingAdapter.ProcessImage(System.IO.Stream, Double, Double)'.

    Mamphekgo

    SharePoint help sysadmin announcement

  • use dataset with case statement
    M Mamphekgo Bahula

    Hi i populate dataset with data from uif table and one of the colum is marriage status which is integer so i want to you case statement where for example if marriage_status is 1 then it has to display single on detailsview. here is my code int MarriageStatus = (int)dataset.Tables["uif"].Rows[0]["marriage_stat"]; string status = Convert.ToString(MarriageStatus); switch(MarriageStatus){ case 0: status="Single"; break; case 1: status="Single"; break; case 2: status = "married"; break; case 3: status="Widowed"; break; case 4: status="Divorced"; break; }

    Mamphekgo

    C# tutorial

  • does show update and cancel on a first click
    M Mamphekgo Bahula

    hi i have datagrid where i display data and i have set AutoGenerateDeleteButton="true" AutoGenerateEditButton="true".when i click edit on gridview once it doesn't show upadte and cancel,it only shows when i click for second time. here is my code protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing GridView1.EditIndex = e.NewEditIndex CType(GridView1.Rows(e.NewEditIndex).FindControl("ddlgvclients"), DropDownList).Enabled = True CType(GridView1.Rows(e.NewEditIndex).FindControl("ddlgvregions"), DropDownList).Enabled = True CType(GridView1.Rows(e.NewEditIndex).FindControl("ddlgvservices"), DropDownList).Enabled = True End Sub

    Mamphekgo

    ASP.NET design announcement

  • using store procedure to insert selected checkboxlist values into database
    M Mamphekgo Bahula

    Hi I created store produce to insert selected values from checkboxlist into sql database and it gives me this error "Procedure or function SaveAdmin has too many arguments specified." here is my store procedure ALTER PROCEDURE [dbo].[SaveAdmin] -- Add the parameters for the stored procedure here @Perno int, @Client_id int, @Region_id int, @Service_id int AS INSERT INTO Admin(Perno, Client_id, Region_id, Service_id) VALUES(@Perno, @Client_id, @Region_id, @Service_id) and here is my vb.net code cmdStandby.CommandText = "SaveAdmin" cmdStandby.CommandType = CommandType.StoredProcedure cmdStandby.Connection = sqlstandby cmdStandby.Parameters.AddWithValue("@Perno", lblEmpNo.Text) cmdStandby.Parameters.AddWithValue("@Client_id", ddlClient1.SelectedValue) For Each li In ChkRegion.Items If li.Selected = True Then cmdStandby.Parameters.AddWithValue("@Region_id", li.Value) End If Next For Each li In ChkService.Items If li.Selected = True Then cmdStandby.Parameters.AddWithValue("@Service_id", li.Value) End If Next cmdStandby.ExecuteNonQuery() thanx in advance

    Mamphekgo

    Visual Basic database csharp help

  • displaying results on dropdownlist
    M Mamphekgo Bahula

    if the value does exist how can assign 0 to non existing values

    Mamphekgo

    Visual Basic help database announcement

  • displaying results on dropdownlist
    M Mamphekgo Bahula

    Hi I am displaying locations on dropdownlist so the problem is if i have selected record which is not in the database it gives me this error" 'ddlLocation' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value " here is my code and is working perfect if the record is in the database If strPerNo = "" Then Session("samacc") = HttpContext.Current.User.Identity.Name.ToLower emp = cEmp.GetEmp(Session("samacc")) 'empPhoto = cEmp.DisplayPhoto(emp.perno) Else emp = cEmp.GetEmpByPerNo(strPerNo) 'btnAdmin.Text = "UPDATE" End If If emp.perno = "" Then Response.Write(Session("samacc") + " not found") Else Session("perno") = emp.perno Response.Write(emp.name + " " + emp.surname) Session("ImgPerNr") = emp.perno txtFirstname.Text = emp.name txtLastname.Text = emp.surname txtDivision.Text = emp.BsUnit lblBU.Text = emp.BsUnit txtBlock.Text = emp.block txtFloor.Text = emp.floorno txtRoom.Text = emp.roomno txtInt.Text = emp.Int1 txtTel.Text = emp.tel txtAltTelNo.Text = emp.alttel txtCell.Text = emp.cellno txtAltCell.Text = emp.altcellno txtEmail.Text = emp.email txtFax.Text = emp.fax txtAltEmail.Text = emp.altemail If ddlLocation.SelectedValue <> "0" Then ddlLocation.SelectedValue = emp.LocID Else ddlLocation.SelectedValue = 0 End If

    Mamphekgo

    Visual Basic help database announcement

  • Help is needed in Displaying Data inside table or Gridview control
    M Mamphekgo Bahula

    Populate dataset and from there bind your dataset to gridview.i don't know if this will help Gridview .datasource = dsvihicle gridview.databind()

    Mamphekgo

    ASP.NET database help question

  • displaying image on a image control
    M Mamphekgo Bahula

    Hi I have created database where i store employees 's pictures and i am able to display this images on a asp.net page where i use "Response.BinaryWrite(dr.Item("Picture"))" so it display it.The problem is i have to display this pictures on a image control which i can't figure it how can i do it.

    Mamphekgo

    ASP.NET csharp asp-net database help question

  • searching data from one form and displaying to another form
    M Mamphekgo Bahula

    Hi i have a form which has only employee number textbox and button when the user enter employee number it search the employee number from database and if the employee is found it must display employee details to another form which has all textboxes like names,surname,regionname.etc.I have search functionality which only works if i use one form so i must use two forms one for search and one for displaying

    Mamphekgo

    ASP.NET database algorithms

  • selecting a value from dropdownlist
    M Mamphekgo Bahula

    is binded from database

    Mamphekgo

    ASP.NET database help tutorial

  • selecting a value from dropdownlist
    M Mamphekgo Bahula

    it remove it permanently.

    Mamphekgo

    ASP.NET database help tutorial

  • selecting a value from dropdownlist
    M Mamphekgo Bahula

    Hi i have populated dropdownlist with data from database on form load.the problem is when ever i select a something from dropdownlist is removing the default value.for the example if my default value was jakes and select jacob it removes jakes from dropdownlist

    Mamphekgo

    ASP.NET database help tutorial

  • Selecting a value from downdownlist
    M Mamphekgo Bahula

    Hi i have managed to populate dropdownlist from database so i want to select a value from dropdownlist and insert it into database.The problem is when ever i select a value it always select the first value regardless of what i choose.everything is working except dropdownlist here is my code cmdEmployee.Parameters.Add("@Emp_No", SqlDbType.Int).Value = TextBox1.Text cmdEmployee.Parameters.Add("@Location_ID", SqlDbType.Int).Value = DropDownList1.SelectedItem.Value cmdEmployee.Parameters.Add("@Tel", SqlDbType.VarChar).Value = txtTel.Text.ToString() cmdEmployee.Parameters.Add("@Fax", SqlDbType.VarChar).Value = txtFax.Text.ToString() cmdEmployee.Parameters.Add("@Cell", SqlDbType.VarChar).Value = txtCell.Text.ToString() cmdEmployee.Parameters.Add("@Alternative", SqlDbType.VarChar).Value = txtAlternative.ToString() cmdEmployee.Parameters.Add("@Block", SqlDbType.VarChar).Value = txtBlock.Text.ToString() cmdEmployee.Parameters.Add("@Floor1", SqlDbType.VarChar).Value = txtFloor.Text.ToString() cmdEmployee.Parameters.Add("@Room_Number", SqlDbType.VarChar).Value = txtRoom.Text.ToString() cmdEmployee.ExecuteNonQuery()

    Mamphekgo

    Visual Basic database help

  • display information on list box when treeview node is selected
    M Mamphekgo Bahula

    Hi i have populated data to treeview from sql so i want display information on the list box about certain childnodes e.g(product id ,product price)when ever a node is selected from treeview.

    Mamphekgo

    Visual Basic database

  • calling forms from treeview nodes
    M Mamphekgo Bahula

    Hi i want select a node from treeview nodes and call the form that i have selected its node. here is my code. node1 = "Company"; node2 = "Process"; node3 = "Script"; node4 = "Group"; node5 = "User"; if (node1 == "Company" ) { cmsCompany.Show(); } else if (node2 == "Process") { cmsProcess.Show(); } else if (node3 == "Script") { cmsScript.Show(); } else if (node4 == "Group") { cmsGroup.Show(); } else if (node5 == "User") { cmsUser.Show(); }

    Mamphekgo

    C# tools

  • saving graph as an xml file
    M Mamphekgo Bahula

    hi i have created this method to display graph on a form and is display but the problem that i have is that i want to save this method as an xml file but i can't get it right.under this method there is code that i am trying to use to save this method as an xml file. private void DisplayTools() { Graph g = Graph("graph"); g.AddNode("Circle"); g.AddNode("Box"); g.AddNode("Ellipse"); g.AddNode("Diamond"); Edge e1 = (Edge)g.AddEdge("Circle", "Box"); Edge e2 = (Edge)g.AddEdge("Box", "Ellipse"); Edge e3 = (Edge)g.AddEdge("Ellipse", "Diamond"); Edge e4 = (Edge)g.AddEdge("Diamond", "Circle"); Node n1 = (Node)g.FindNode("Circle"); n1.Attr.Color = Microsoft.Glee.Drawing.Color.Black; n1.Attr.Shape = Shape.Circle; Node n2 = (Node)g.FindNode("Box"); n2.Attr.Color = Microsoft.Glee.Drawing.Color.Black; n2.Attr.Shape = Shape.Box; Node n3 = (Node)g.FindNode("Diamond"); n3.Attr.Color = Microsoft.Glee.Drawing.Color.Black; n3.Attr.Shape = Shape.Diamond; gViewer1.Graph = g; here is code that i am trying to use to save as an xml file FileStream fs = new FileStream("methods.xml", FileMode.Create); XmlTextWriter w = new XmlTextWriter(fs,Encoding.UTF8); w.WriteStartDocument(); w.WriteStartElement("methods"); DisplayTools(); w.WriteEndElement(); w.WriteEndDocument(); w.Flush(); fs.Close();

    Mamphekgo

    C# graphics data-structures xml help

  • how to create tree nodes and save it as an xml
    M Mamphekgo Bahula

    Hi I want to create treenode and save those node as an xml file can any one please help.

    Mamphekgo

    C# data-structures xml help tutorial

  • DockPanel
    M Mamphekgo Bahula

    Hi I am trying to load shapes like rectangle and ellipse on a dockpanel but i cannot figure it out how can i do it.can someone please gave a sample of how can i do it then i will take it from there.

    Mamphekgo

    C# question

  • Netron
    M Mamphekgo Bahula

    Is netron 3

    Mamphekgo

    C# xml
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups