Click here to Skip to main content
15,033,650 members

Comments by saifulhaque (Top 21 by date)

saifulhaque 8-Sep-21 6:15am View
   
It is working fine.Thank you so much...
saifulhaque 15-Jul-21 10:58am View
   
Yes it is far

My sql query procedure

SELECT	ISH.BinLocation AS [BinLocation], I.ItemName, I.[Description], ISH.QuantityInStock, 
		CAST(
				(
					CAST(I.BoxLength AS DECIMAL) * CAST(I.BoxHeight AS DECIMAL) * CAST(I.BoxWidth AS DECIMAL) * CAST(ISH.QuantityInStock AS DECIMAL)
				) 
				/ @CubicInchToCubicFeetConversionFactor
				AS DECIMAL(18,2)
			) 
		AS [ItemVolumeCF],
		I.BoxLength, I.BoxHeight, I.BoxWeight, I.StatusEnum,ISH.SnapshotDate 
FROM Item AS I
inner join InventorySnapshot AS ISH ON I.Id =ISH.ItemId
and ISH.SnapshotDate=CAST(@SnapshotDate AS DATE)
<pre lang="SQL"><pre lang="SQL">


I am passing date from MVC view .date part only.
When I am checking with locally connected with web.cofig it is working fine.
When I published to server rows are coming before one day.

Time zone mountain standard time


If I try to add one day with date inside code it is working.I think it is because of time diffrence.How we can solve this.
saifulhaque 23-Jun-21 5:35am View
   
Thank you for your efforts !! . The code is working fine .
saifulhaque 22-Jun-21 15:18pm View
   
This string is not fixed.It is dynamic .I posted here an example.If the person search keyword in text box with space normally sql query will convert % and show the matching result.
We can use like this an example

Copy Code
SELECT *
FROM Item WHERE (PartNumber LIKE 'KEA%12201%N%')

May be the person search more spaces it should be show the matching result.

Example

Search key word is 'asd hjk tyu io 456 tyu' in sql direct query in management studio editor replacing space with % will show exact result.
saifulhaque 22-Jun-21 15:13pm View
   
This is not working .May be EF version different
saifulhaque 17-Sep-19 1:39am View
   
Yes.It already on the top.
saifulhaque 17-Sep-19 1:38am View
   
Dear Richard ,

I tried different method using this link but not success.Can you provide exact link.
I hosted API web application in IIS and trying to post and put into this web application from another web application using above mentioned code.
saifulhaque 24-Aug-12 4:43am View
   
This is for windows application.I tried but no way to solve
saifulhaque 10-Nov-11 2:54am View
   
http://www.dotnettwitter.com/2011/02/group-total-grand-total-in-grid-view.html

You can see this page
I want sort amount by date instred of year.In this two sub total i need only one and grand total from using database instred of xml file
saifulhaque 26-Sep-10 13:57pm View
   
I need inserting multiple record at a single click
saifulhaque 26-Sep-10 11:03am View
   
leave delete, First i want to do insert multiple record into database though Gridview without using SqlDataSource.Then i want display record to that Gridview .After that i want update multiple item simultaneously by single button.
saifulhaque 7-Aug-10 2:10am View
   
Actually I am trying this ,I am giving an example

In Class1.cs

public static string GetControl()
{

Label Label1 = new Label();
Label1.Text = "City Name";
TextBox TextBox1 = new TextBox();
TextBox1.Text = "London";

//Controls inside ContentPlaceHolder Default.aspx

}

In Default.aspx

Default.aspx page contains Label1,TextBox1 under ContentPlaceHolder

I want to get Label1.Text="City Name" and TextBox1.Text="London" is it possible.

protected void Button1_Click(object sender, EventArgs e)
{
Class1.GetControl();
}
saifulhaque 7-Aug-10 2:10am View
   
Actually I am trying this ,I am giving an example

In Class1.cs

public static string GetControl()
{

Label Label1 = new Label();
Label1.Text = "City Name";
TextBox TextBox1 = new TextBox();
TextBox1.Text = "London";

//Controls inside ContentPlaceHolder Default.aspx

}

In Default.aspx

Default.aspx page contains Label1,TextBox1 under ContentPlaceHolder

I want to get Label1.Text="City Name" and TextBox1.Text="London" is it possible.

protected void Button1_Click(object sender, EventArgs e)
{
Class1.GetControl();
}
saifulhaque 5-Aug-10 0:46am View
   
I can't understant this statement.Can you clear that. Applying this getting errors var labels = from Control c in panel1.Controls where c.GetType().Equals(typeof(Label)) select c; In my code unsafe i was trying this.Leave that unsafe block.
saifulhaque 4-Aug-10 10:36am View
   
I have Label id like Label1,Label2..etc in my Default.aspx.

I want to get automatically label id from database field col_id

(Label1,Label2 ..etc) and appened ".Text" with each Label.Then it will come

Label1.Text,Label.Text2 etc.. .I want read col_name this

Label1.text,Label2.Text etc.. from database field col_name through while

loop.Is it possible through some other way.I am thinking my code is

incorrect.Think another way. Share with your friends also.

Try to Help.
saifulhaque 4-Aug-10 6:57am View
   
I had Label in my Default.aspx page I want to pass only value of

p_opt_id . Label1,Label2 are generated from database field col_id through

while loop,Then appened .Text with Labels,This will create

Label1.Text,Label2.Text etc.. .After that i want to read value from database

field col_name to Label1.text,Label2.Text etc in while loop ,You can see in my code which had given.
saifulhaque 4-Aug-10 6:56am View
   
I think you are not understant my questain ,I want to pass only value of

p_opt_id . Label1,Label2 are generated from database field col_id through

while loop,Then appened .Text with Labels,This will create

Label1.Text,Label2.Text etc.. .After that i want to read value from database

field col_name to Label1.text,Label2.Text etc in while loop ,You can see in my code which had given.
saifulhaque 4-Aug-10 6:47am View
   
Deleted
I think you are not clear my questain, I want to pass only value of p_opt_id

Label1,label2 are generated from database feild col_id through while

loop,Then append .Text with that ,This will create Label1.Text ,Label2.Text

etc... After that i want read value from database feild col_name to Label1.Text ,Label2.Text etc in while loop.

with .Text
saifulhaque 4-Aug-10 5:50am View
   
My Qustain in detail is Given Below I am not sure it is working or not

Really i want to set the value for textbox1 dynamically.


I am thinking this will understant



Table Name: Columns



col_id col_name

======= ==========================

Label1 City ID

Label2 City Name

Label3 City Addrs





i want to set all the lables from the table "Columns".



This function will be called at the time of Page Load()





More Details of My code "I am not Sure It is True"



In Class file Main.cs









public static string GetColum_Des(string p_opt_id)



{



string str = System.Configuration.ConfigurationManager.ConnectionStrings["sql"].ConnectionString;



SqlCommand cmd;

SqlDataReader rd;

SqlConnection con = new SqlConnection(str);







unsafe

{

string str1, str2;





con.Open();

cmd = new SqlCommand("select col_id,col_name from LOCATIN_DETAIL where opt_ID=@p_opt_id ", con);

cmd.Parameters.AddWithValue("@p_opt_id", p_opt_id);

rd = cmd.ExecuteReader();

while (rd.Read())

{

str1 = rd["col_id"].ToString() + ".Text";//I want to get Label Id from here +.Text Means "Label1.Text" in str

str2=rd["col_name"].ToString();//I want to get Label value from here which had stored in database fied col_name

str1 = str2; //Means Label1.Text=str2 is it possible

}

}



return "";

}





This Function is calling on Page_Load of Default.aspx





protected void Page_Load(object sender, EventArgs e)

{

Main.GetColum_Des("001001001")//Passing value of p_opt_id

}





Expecting Your Help
saifulhaque 2-Aug-10 4:22am View
   
//This is from class.cs

public static string GetColum_Des(string p_opt_id)

{

string str = System.Configuration.ConfigurationManager.ConnectionStrings["sql"].ConnectionString;

SqlCommand cmd;
SqlDataReader rd;
SqlConnection con = new SqlConnection(str);
Label LOC_ID_Lab = new Label();

unsafe
{
string str, str1;


con.Open();
cmd = new SqlCommand("select col_id,col_de_en from ERP_OPT_DET where opt_ID=@p_opt_id ", con);
cmd.Parameters.AddWithValue("@p_opt_id", p_opt_id);
rd = cmd.ExecuteReader();
while (rd.Read())
{
str = rd["col_id"].ToString() + "Text";//I want to get Label Id from here +.Text Means "Label1.Text" in str
str1=rd["col_name"].ToString();//I want to get Label value from here which had stored in database fied col_name
str = str2; //Means Label1.Text=str2 is it possible
}
}

return "";
}


I am calling This fuction page_load of Default.aspx
protected void Page_Load(object sender, EventArgs e)
{
Main.GetColum_Des("001001001")
//Passing value of p_opt_id
}


Need Help
saifulhaque 2-Aug-10 2:58am View
   
Almost Like that,Can i store value of Label l as string then str=Reader[col_id].ToString(); and str.Text =Reader["col_name"].ToString();
In while loop i want to change the string value from field as col_id,When looping
Then string will get every field value of col_id and str.Text will get field value of col_name automatically
Have you any suggestions or forward to your friends.

I think you can understant this,I want to write code in class.cs