Click here to Skip to main content
14,741,131 members

Comments by Member 11280947 (Top 70 by date)

Member 11280947 1-Feb-16 5:42am View
   
Thank You
Member 11280947 1-Feb-16 5:37am View
   
Yes I Need Check The Content of the textbox
Member 11280947 20-Oct-15 6:20am View
   
string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
using (SqlConnection con2 = new SqlConnection(CS))
{
SqlDataAdapter sda2 = new SqlDataAdapter("SELECT * FROM [TestCodeTBL] WHERE ([CodeNumbber] ='" + TxtPo.Text + "') ", CS);

DataTable dt2 = new DataTable();
sda2.Fill(dt2);
if (dt2.Rows.Count > 0)
{
MessageBox.Show("This Data Already Exists");
}
else
{

// Set Minimum to 1 to represent the first file being copied.
progressBar1.Minimum = 1;
// Set Maximum to the total number of Users created.
progressBar1.Maximum = dt2.Rows.Count;
// Set the initial value of the ProgressBar.
progressBar1.Value = 1;
// Set the Step property to a value of 1 to represent each user is being created.
progressBar1.Step = 1;



SqlCommand cmd2 = new SqlCommand("InsertCountCode", con2);
cmd2.CommandType = System.Data.CommandType.StoredProcedure;
cmd2.Parameters.AddWithValue("@count", txtStart.Text);
cmd2.Parameters.AddWithValue("@po", TxtPo.Text);
cmd2.Parameters.AddWithValue("@maxcounter", TxtMax.Text);
cmd2.Parameters.AddWithValue("@Style", comboStyle.Text);


con2.Open();
cmd2.ExecuteNonQuery();



// Loop through all files to copy.
for (int i = 1; i <= dt2.Rows.Count; i++)
{
bool result = InsertUserdetails(Username);--------------Problem Here
// Copy the file and increment the ProgressBar if successful.
if (result == true)
{
// Perform the increment on the ProgressBar.
progressBar1.PerformStep();
}
}

MessageBox.Show("Saved");
BtnNew.Enabled = true;
btnSave.Enabled = false;
}

}
Member 11280947 20-Oct-15 3:36am View
   
Thank You First .
How Can Use This In My Code




// Loop through all files to copy.
for (int i = 1; i <= dt.Rows.Count; i++)
{
bool result=InsertUserdetails(Username);---------------Explain This Please
// Copy the file and increment the ProgressBar if successful.
if(result== true)
{
// Perform the increment on the ProgressBar.
Progressbar1.PerformStep();
}
}
Member 11280947 13-Oct-15 3:28am View
   
Thank You
Member 11280947 13-Oct-15 3:28am View
   
Thank You
Member 11280947 13-Oct-15 3:02am View
   
Insert From
155460001
155460002
155460003
155460004
155460005


I Need Loop To Do That
Member 11280947 11-Oct-15 5:54am View
   
i Don't Understand This :
Update CodeTbl set num = "4555"||num where num not null;
Member 11280947 21-Sep-15 8:52am View
   
How ?
Member 11280947 22-Aug-15 16:30pm View
   
what Do You mean meaning
Member 11280947 22-Aug-15 16:25pm View
   
I need By Select Statement
Member 11280947 11-Aug-15 1:28am View
   
Thank You
Member 11280947 11-Aug-15 1:06am View
   
How Can use this code with 2 statement
Member 11280947 22-Jul-15 10:51am View
   
Thank You Very match
That is Right
Member 11280947 16-Jul-15 6:02am View
   
What Do You mean
Member 11280947 16-Jul-15 5:43am View
   
No In Database 1 row
In dataGridView 4 rows
Member 11280947 16-Jul-15 5:29am View
   
There is no duplicate rows in SQL
Member 11280947 16-Jun-15 14:42pm View
   
in crystal report I need:
to select crent year and second year
Member 11280947 16-Jun-15 14:26pm View
   
i use crystal report
Member 11280947 16-Jun-15 13:56pm View
   
i use this store procedure in my report I trig to display for example: second year
Member 11280947 16-Jun-15 13:47pm View
   
ALTER proc [dbo].[PrinttProducts_TBL]
@Product_id int

as
select pt.Product_id ,pt.Product_name ,pt.Product_Price
from dbo.Products_TBL pt
inner join tblcatProducts cp on cp.catId = pt.FK_catId inner join StoresTBL st on pt.FK_Store_id = st.Store_id
where Product_id=@Product_id

select DATEADD(year, 1, '2006-08-30') as Datenew


i need to store this in parameter (second select statement)
Member 11280947 16-Jun-15 13:36pm View
   
the first select statement
and second select statement
Member 11280947 16-Jun-15 13:35pm View
   
yes
Member 11280947 12-Jun-15 17:57pm View
   
Thank you the problem is combobox value
Member 11280947 4-Jun-15 5:31am View
   
Thank You
Member 11280947 4-Jun-15 5:31am View
   
Thank You
Member 11280947 3-Jun-15 6:19am View
   
Thank You By The Way
Member 11280947 3-Jun-15 6:18am View
   
Can You Explain More as code
Please
Member 11280947 3-Jun-15 6:06am View
   
How
Member 11280947 29-May-15 14:14pm View
   
Thank You Every on I solved problem
Member 11280947 22-May-15 6:51am View
   
Thank You
Member 11280947 22-May-15 6:51am View
   
Thank You
Member 11280947 22-May-15 6:02am View
   
Thank You
Member 11280947 22-May-15 6:02am View
   
Thank You
Member 11280947 4-May-15 8:10am View
   
What I Do I Cant Under Stand
Member 11280947 29-Apr-15 3:33am View
   
what do you mean
Member 11280947 28-Apr-15 8:15am View
   
but the Data evry time Will Change
Member 11280947 26-Apr-15 6:14am View
   
OK but way when i need to select date i mast select day before
Member 11280947 26-Apr-15 6:06am View
   
WHERE rnd.Product_Id = @Product_Id and rnh.Receipt_Date >= @DT1 AND <= @DT2";
how Can do that
Member 11280947 26-Apr-15 5:58am View
   
I don't Understand
Member 11280947 26-Apr-15 3:58am View
   
When Select The day it give me The sacuund day
like if select day 9 it give me 10
How can select specific Day
Member 11280947 26-Apr-15 3:25am View
   
How
Member 11280947 24-Apr-15 15:57pm View
   
Thank You
Member 11280947 24-Apr-15 15:56pm View
   
Thank You
Member 11280947 24-Apr-15 15:56pm View
   
Thank You
Member 11280947 22-Apr-15 2:56am View
   
Thank You I solved By My self
Member 11280947 15-Apr-15 13:46pm View
   
Thank You
Member 11280947 15-Apr-15 12:24pm View
   
I have Tow Invoices
one in 2015-04-15
Second 2015-04-01



it Gives my Tow 2015-04-15 Way
Member 11280947 15-Apr-15 12:22pm View
   
select ipd.FK_Product_id,pt.Product_name,iph.FK_Store_id ,st.Store_name,iph.Invoice_Date,ipd.QTY,ipd.TotalInvoice from InvoicePurchaseHead as iph join StoresTBL as st on st.Store_id=iph.FK_Store_id join InvoicePurchaseDetails as ipd on ipd.FK_Customers_id=iph.FK_Customers_id join Products_TBL as pt on pt.Product_id=ipd.FK_Product_id WHERE ipd.FK_Product_id = 1 and iph.Invoice_Date = DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0)



This my Code Sql also Duplicated result Wahy
Member 11280947 14-Apr-15 15:44pm View
   
Thank You My Problem is solved
Member 11280947 14-Apr-15 15:44pm View
   
Thank You My Problem is solved
Member 11280947 14-Apr-15 15:38pm View
   
What do mean
Member 11280947 14-Apr-15 15:37pm View
   
the column in my database is float
Member 11280947 14-Apr-15 15:30pm View
   
The code Running With out insert to database
Member 11280947 14-Apr-15 15:29pm View
   
I put con.Open() above the start of the for loop, and the cmd2.ExecuteNonQuery() inside the for loop.
and there no insert into database
Member 11280947 14-Apr-15 15:28pm View
   
i Have many Row in dataGridView1 some column floate
Member 11280947 14-Apr-15 15:27pm View
   
if you have another way to insert data from dataGridView1 Tell me
Member 11280947 14-Apr-15 15:21pm View
   
What Do you mean
Member 11280947 14-Apr-15 15:19pm View
   
But there is no error and no Insert into database
Member 11280947 14-Apr-15 15:14pm View
   
Same Error
Member 11280947 13-Apr-15 14:27pm View
   
Thank You
Member 11280947 8-Apr-15 3:35am View
   
Thank You
Member 11280947 6-Apr-15 5:18am View
   
Error Message:

catId is neither a DataColumn nor a DataRelation for table .




cmd2.Parameters.AddWithValue("@FK_catId", ((DataRowView)comboBoxFK_catid.SelectedValue)["catId"]);

catId : From another Table
Member 11280947 6-Apr-15 5:11am View
   
The mesage is:

no mapping exists from object type System.Data.DataRowViwe to a Known managed provider native type
Member 11280947 6-Apr-15 5:10am View
   
cmd2.Parameters.AddWithValue("@FK_catId",Convert.ToInt32( comboBoxFK_catid.SelectedValue));


The Error Message :

Unable to cast object of type 'System.Data.DataRowView' to type 'System.IConvertible'.
Member 11280947 6-Apr-15 4:56am View
   
The mesage is:

no mapping exists from object type System.Data.DataRowViwe to a Known managed provider native type

Member 11280947 6-Apr-15 4:39am View
   
The code not running with SelectedValue
Member 11280947 31-Mar-15 15:53pm View
   
how can use the store procedure
Member 11280947 30-Mar-15 15:39pm View
   
1-this First code

ReportDocument report = new ReportDocument();
TableLogOnInfo logoninfo = new TableLogOnInfo();
ConnectionInfo connectioninfo = new ConnectionInfo();
Tables tables;

connectioninfo.ServerName = "<your database="" server="" name="">"
connectioninfo.DatabaseName = "<your database="" name="">";
connectioninfo.UserID = "<your database="" user="">";
connectioninfo.Password = "
Member 11280947 17-Dec-14 4:24am View
   
Did not get anything


cmd.CommandType = CommandType.Text;
cmd.Connection = sqlcon;
cmd.CommandText = "INSERT INTO TBL_Customers (customer_name,FK_fk_id,commissary,FK_area_id,customer_address,tel1,tel2,id_number,datebirth,tel4) VALUES (@customer_name,@FK_fk_id,@commissary,@FK_area_id,@customer_address,@tel1,@tel2,@id_number,@datebirth,@tel4)";
cmd.Parameters.AddWithValue("@customer_name", txtname.Text);
cmd.Parameters.AddWithValue("@FK_fk_id", comboCategoryCustomers.ValueMember);
cmd.Parameters.AddWithValue("@commissary", txtcommissary.Text);
cmd.Parameters.AddWithValue("@FK_area_id", comboAreaCustomer.ValueMember);
cmd.Parameters.AddWithValue("@customer_address", txtcustomer_address.Text);
cmd.Parameters.AddWithValue("@tel1", txttel1.Text);
cmd.Parameters.AddWithValue("@tel2", txttel2.Text);
cmd.Parameters.AddWithValue("@id_number", txtid_number.Text);
cmd.Parameters.AddWithValue("@datebirth", this.dateTimePicker1datebirth);
cmd.Parameters.AddWithValue("@tel4", txttel4.Text);




sqlcon.Open();
cmd.ExecuteNonQuery();

MessageBox.Show("Saved");
sqlcon.Close();