Devam Ediyor

Ammend Some C# code to include a condition where the sql changes

OK so I have this code:

protected void getProductsList(string strProductID = "")

{

try

{

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL] = [login to view URL];

[login to view URL]();

query = "SELECT [ProductID], [Product_Name], [Package_Type_ID], [shipping_price], [product_size_weight] FROM tbl_Products " +

" WHERE [Product_Name] LIKE \"" + [login to view URL] + "%\" " +

" And [sender] = '" + [login to view URL] + "' And [receiver] = '" + [login to view URL] + "' " +

" ORDER BY [Product_Name]";

dvsql = new DataView();

dvsql = DataAccess.SelectDataView_TMS(query);

if ([login to view URL] <= 0)

{

NoticeDiv(true);

[login to view URL] = "ยังไม่มีข้อมูล เช็กสินค้าดีๆ";

[login to view URL] = [login to view URL];

[login to view URL]();

return;

}

else

{

for (int i = 0; i < [login to view URL]; i++)

{

ListItem newItem = new ListItem();

[login to view URL] = dvsql[i]["ProductID"].ToString();

[login to view URL] = dvsql[i]["Product_Name"].ToString() + " ( " + dvsql[i]["package_type_id"].ToString() + ") หมว่ยละ: " + dvsql[i]["shipping_price"].ToString() + " บาท";

[login to view URL](newItem);

}

if (strProductID == "")

{

[login to view URL] = 0;

}

else

{

[login to view URL](strProductID).Selected = true;

}

fillProductsInfo();

}

}

catch (Exception ex)

{

[login to view URL]("Error Occurs when getting Products List. " + [login to view URL], [login to view URL]);

}

}

Currently, it just displays a generic message which says, the product isn't found, what I want to do is change it to three conditions

condition one:

No product in list use a tbl_generic_product list

condition 2:

No product found in either table add new

condition 3:

as is

----------

so effectively you're just adding a new condition to the existing code

Beceriler: C# Programlama, ASP.NET, Microsoft Access

Daha fazlasını gör: write code transfer data sql server excel, sample code import data sql server, vb6 code restore backup sql, zip code proximity search sql server, code project xls sql, code save image sql server 2005, aspnet code login form sql server 2005, code transfer data sql database, aspnet code reservation flight sql, source code crystal vb6 sql server 2000, asp code upload file sql, code export data sql multiple sheet excel 65000, zip code radius search sql, sample code save image sql server 2005, code asp quiz sql database, code igniter php sql server 2000, international weather code table condition, code latitude longitude sql proximity

İşveren Hakkında:
( 68 değerlendirme ) Bangkok, Thailand

Proje NO: #21154262

Bu iş için 3 freelancer ortalamada $40 teklif veriyor

MrtDolphin

Hi, I will do it right now. Please contact me. regards

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(5 Değerlendirme)
5.4
dungforever

Dear Sir How are you? I am very glad to place a bid to your project I have read your description carefully and i am so interested in your project. I am skillful Asp.net web developer and i have finished a lot of proje Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(24 Değerlendirme)
4.5
superdev1888

⭐ Dear, Client ⭐ I read your description carefully and I understand the goal. I am a software engineer and have done many desktop applications. And all the projects will be developed with high quality and high speed Daha Fazla

$20 USD in 7 gün içinde
(0 Değerlendirme)
0.0