Good day i don't understand your answer
Mamphekgo
Good day i don't understand your answer
Mamphekgo
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
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
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
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
if the value does exist how can assign 0 to non existing values
Mamphekgo
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
Populate dataset and from there bind your dataset to gridview.i don't know if this will help Gridview .datasource = dsvihicle gridview.databind()
Mamphekgo
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
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
is binded from database
Mamphekgo
it remove it permanently.
Mamphekgo
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
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
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
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
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
Hi I want to create treenode and save those node as an xml file can any one please help.
Mamphekgo
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
Is netron 3
Mamphekgo