I got a ID
which are LSHOE-UCT. How can I substring and seperate those ID in order to become:
gender = "L"
Product = "Shoe"
Category = "UCT"
Here is my code:
private void assignProductCategory(string AcStockCategoryID)
{
//What should I insert?
string[] splitParameter = AcStockCategoryID.Split('-');
}
I need to seperate those, ID them and insert to difference table from my database. And that is where I am having the main problem
string[] s = AcStockCategoryID.Split('-');
string gender = s[0].Substring(0, 1);
string Product= s[0].Substring(1, s[0].Length - 1);
string Category = s[1];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With