thanks i put my question in many forum of programing but i just now my question in janus forum.
fatemehsoleimani
Posts
-
problem in insert image in sql with janus control use -
problem in insert image in sql with janus control usehi i will insert info person to database and i use janus control and bind all input from databinding and bind picturebox and mathimage that is editbox and in run accure error: Update requires a valid UpdateCommand when passed DataRow collection with modified rows my code: save: try { bimehgozarBindingSource.EndEdit(); bimehgozarTableAdapter.Update(this.bimehDataSet.bimehgozar); } catch (Exception ex) { MessageBox.Show(ex.Message); } new: bimehgozarBindingSource.AddNew(); string query = "SELECT MAX(code_bg) FROM bimehgozar"; SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=bimeh;Integrated Security=True"); SqlCommand comSelect = new SqlCommand(query, con); con.Open(); string ID = comSelect.ExecuteScalar().ToString(); if (ID == "") editBox8.Text = 1.ToString(); else { int a = Convert.ToInt32(ID); a = a + 1; editBox8.Text = a.ToString(); } editBox1.Text = ""; editBox2.Text = ""; editBox3.Text = ""; editBox4.Text = ""; editBox5.Text = ""; editBox6.Text = ""; editBox7.Text = ""; editBox11.Text = ""; editBox12.Text = ""; editBox13.Text = ""; editBox14.Text = ""; pictureBox1.Image = null; i am accure errore in save Button click please help me i am tired. how save image when use janus control beacuse i use janus control not have value for insert. wheather i need to convert image to array. please guide me i want to insert info and long time accure error. best regards
-
problem with multicolumncombo and bindingnavigator movenext ,...my problem resolved my code: [php] private void Form2_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'phonebookDataSet.moshtarakin_hoghoghi' table. You can move, or remove it, as needed. this.moshtarakin_hoghoghiTableAdapter.Fill(this.phonebookDataSet.moshtarakin_hoghoghi); SqlConnection ConSub = new SqlConnection("Data Source=.;Initial Catalog=phonebook;Integrated Security=True"); ConSub.Open(); SqlDataAdapter Adapter = new SqlDataAdapter("Select * from State", ConSub); DataTable State = new DataTable(); Adapter.Fill(State); multiColumnCombo1.DataSource = State; Adapter.SelectCommand.Connection = ConSub; Adapter.SelectCommand.CommandText = "Select * from StateCity where State_Id='" + Convert.ToInt32(multiColumnCombo1.Value.ToString()) + "'"; DataTable StateCity = new DataTable(); Adapter.Fill(StateCity); multiColumnCombo2.DataSource = StateCity; Adapter.SelectCommand.Connection = ConSub; Adapter.SelectCommand.CommandText = "Select * from groh"; DataTable groh = new DataTable(); Adapter.Fill(groh); multiColumnCombo3.DataSource = groh; Adapter.SelectCommand.Connection = ConSub; Adapter.SelectCommand.CommandText = "Select * from activity where code_groh='" + Convert.ToInt32(multiColumnCombo3.Value.ToString()) + "'"; DataTable activity = new DataTable(); Adapter.Fill(activity); multiColumnCombo4.DataSource = activity; } private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { moshtarakinhoghoghiBindingSource.AddNew(); if (phonebookDataSet.moshtarakin_hoghoghi.Compute("max(SysCode)+1", null).ToString() != null) editBox1.Text = phonebookDataSet.moshtarakin_hoghoghi.Compute("max(SysCode)+1", null).ToString(); else editBox1.Text = 1.ToString(); editBox3.Text = ""; editBox2.Text = ""; editBox4.Text = ""; multiColumnCombo1.Text = ""; multiColumnCombo2.Text = ""; multiColumnCombo3.Text = ""; multiColumnCombo4.Text = ""; uiComboBox1.Text = ""; } private void multiColumnCombo1_TextChanged(object sender, EventArgs e) {
-
problem with multicolumncombo and bindingnavigator movenext ,...hi i am use 4 multicolumncombi in my form in first navigatorbinding is correct but when one record insert in database my moveprevious and next previous is not show correct tytle in multicolumncombobox and when close program and run program again bindingnavigator is correct but when save again not show tytle correct my source code: [php] private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e) { moshtarakinhoghoghiBindingSource.AddNew(); if (phonebookDataSet.moshtarakin_hoghoghi.Compute("max(SysCode)+1", null).ToString() != null) editBox1.Text = phonebookDataSet.moshtarakin_hoghoghi.Compute("max(SysCode)+1", null).ToString(); else editBox1.Text = 1.ToString(); editBox3.Text = ""; editBox2.Text = ""; editBox4.Text = ""; multiColumnCombo1.Text = ""; multiColumnCombo2.Text = ""; multiColumnCombo3.Text = ""; multiColumnCombo4.Text = ""; uiComboBox1.Text = ""; } [/php] [php] private void multiColumnCombo1_TextChanged(object sender, EventArgs e) { if (multiColumnCombo1.Text != "") stateCityBindingSource.Filter = "State_Id='" + Convert.ToInt32(multiColumnCombo1.Value.ToString()) + "'"; } private void multiColumnCombo3_TextChanged(object sender, EventArgs e) { if (multiColumnCombo3.Text != "") activityBindingSource.Filter = "code_groh='" + Convert.ToInt32(multiColumnCombo3.Value.ToString()) + "'"; } private void toolStripButton1_Click(object sender, EventArgs e) { try { moshtarakinhoghoghiBindingSource.EndEdit(); moshtarakin_hoghoghiTableAdapter.Update(this.phonebookDataSet.moshtarakin_hoghoghi); } catch { } } [/php] . please help me . best regards
-
wating for anser how to add record to database with gridjanus and bindingnavigatori have one table with 3 column=code,name,code_b and in form i have a bindingnavigator that addnewitem=none and bindingsource=fatemebinding and in gridex datasourc=fatemebinding and in gridex allownew=addnew and rowheader=true and headercontent =rowposition and in griddesignert click in createroottable and retrive table and then column table ceated and then code envirement newiconbinding: [php] try { fatemeBindingSource.AddNew(); codmax = Convert.ToInt32(fatemeTableAdapter.maxcode()); codmax = codmax + 1; gridEX1.CurrentRow.Cells["code"].Value = codmax; ((DataRowView)fatemeBindingSource.Current).Row["code"] = codmax; } catch { MessageBox.Show("لطفا اطلاعات را وارد کنید"); } [/php] and save iconbindingnavator: [php] private void toolStripButton1_Click(object sender, EventArgs e) { fatemeBindingSource.EndEdit(); fatemeTableAdapter.Update(this.baziDataSet1.fateme); } [/php] but in run name and code_b value to be null how to asign data column please help me
-
i am tired guides for how to select new record in gridex janus for add in databaseplease help me. i am wating guide for solve problem. best regards
-
i am tired guides for how to select new record in gridex janus for add in databasemy problem is a select last column in grid jans that not to be select. please help me i am tired .i am cellselectionmode =entirerow but not select colunm last gridjanus. please help me :doh:
-
i am tired guides for how to select new record in gridex janus for add in databasehi every one i want when i click icon save in navigator that i new record that updat as case select record and add database but not all record select and show one of record is null beacasue not column select. please help me one of column add with value 0 beacasue not column select. and for add record whiout 0 value i was in run one click after edit a record but i dont click i want in code a click after edit that record to be select how this write . my code: try { ((DataRowView)fatemeBindingSource.Current).Row["code"] = codemax; int g, b; g = Convert.ToInt32(gridEX1.CurrentRow.Cells["code_b"].Value); b = Convert.ToInt32(gridEX1.CurrentRow.Cells["name"].Value); ((DataRowView)fatemeBindingSource.Current).Row["code_b"] = g; ((DataRowView)fatemeBindingSource.Current).Row["name"] = b; fatemeBindingSource.EndEdit(); fatemeTableAdapter.Update(this.baziDataSet.fateme); } catch (Exception ex) { MessageBox.Show(ex.Message); } :confused: best regards
-
wating for anser how to add record to database with gridjanus and bindingnavigatori dont english as well .from all friend want to guide me for solve my problem. i am very very hope that this site firend my problem resolved... best regards
-
chang formthanks for your guides
-
chang formthanks for your guides
-
create transparent form in vclvery thanks for guides.
-
wating for anser how to add record to database with gridjanus and bindingnavigatormy god i am tierd please help me. :confused:
-
wating for anser how to add record to database with gridjanus and bindingnavigatorthat program in first time add a record to database and grid but in secend time show message error column code can not be null. and one problem in select a new row in grid when a type a value for a column that column is to be select and anather column not to be select and then in add record to sql one of column is 0 value. that how total record in select case. please help me :doh: :confused: :( best a regards
-
wating for anser how to add record to database with gridjanus and bindingnavigatori am tierd please help me.i am trying for find reply question a long time.i am tierd. i am set allowaddnew equal true.it might read from new record in grid that is bound and editbox that is unbound and add to data base and add to grid that show error column code can not be null that column code is editbox control and i was delete from column grid. or i should all coulmn from table in out gird and read from there and add to grid and database .i am mixed up :(( best a regards
-
wating for anser how to add record to database with gridjanus and bindingnavigatorhi every one i want add a one record to sql from grid janus and one cell from a editbox control with binding navigator but can not add and message show column code can not null. my source code:
private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
{
codemax = Convert.ToInt32(fatemeTableAdapter.maxcode());
codemax = codemax + 1;editBox1.Text = codemax.ToString(); ((DataRowView)fatemeBindingSource1.Current).Row\["code"\] = codemax; }
and savebinding:
private void save_Click(object sender, EventArgs e)
{
int g, b;
g=Convert.ToInt32(gridEX1.CurrentRow.Cells["code_b"].Value);
b=Convert.ToInt32(gridEX1.CurrentRow.Cells["name"].Value) ;
((DataRowView)fatemeBindingSource1.Current).Row["code_b"] = g;
((DataRowView)fatemeBindingSource1.Current).Row["name"] = b;this.Validate(); fatemeBindingSource1.EndEdit(); fatemeTableAdapter.Update(this.baziDataSet1.fateme); }
i dont how get value from new row in grid please help me best a regards
-
how to add record to database with gridjanus and bindingnavigatorthat value methoad max code= SELECT ISNULL(MAX(code),0) AS ID FROM fateme that in dataset table can not show record added in grid and how record added in grid i have in selected record i should be in find row of grid record to be add but i dont. pleeeeeeeeeeese help meeeeeeeeeeee
-
how to add record to database with gridjanus and bindingnavigatorhi every one i have a bindingnavigator in form and a gridex in form and i set addnew item with value null and i will in bindingnavigatorn in method click a record add to grid but when table is null not add a record to grid and other record to add a grid but i have one click in colum code .please help mee my source code: fatemeBindingSource.AddNew(); int code = Convert.ToInt32(this.fatemeTableAdapter.maxcode()); ((DataRowView)fatemeBindingSource.Current).Row["code"] = code + 1; i dont english as well.please help me best a regards.
-
can not set data source in designerhi, i dont english good and i have problem in gridex bound datasource. i am put gridex janus control in for and i have create dataset for that but i can not set data source in designer jast in designer i can select null for that. please help me thanks regards.
-
create transparent form in vclhi i want create transparnt form in vcl .i am locking for source code transparent form in vcl. i want to put image in form that transparent because form have n't backgrand please help me best regards