TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
hadoop hadoop
NA
159
50.3k
get the data of GridViewRow from one class to another class
May 22 2015 2:47 AM
I've a class "get_productStock.cs" inside "content" folder. Here I am using GridView. I've to pass the the data of GridViewRow to another class "ClsStockMgmt.cs".
This "ClsStockMgmt.cs" is inside folder AppCode -> BusinessObject -> "ClsStockMgmt.cs". how can I do this?
My current approach is I am calling the class in "get_productStock.cs" and pass the data of GridViewRow as object to "ClsStockMgmt.cs"
//***** my current appraoch *****//
// get_productStock.cs
private ClsStockMgmt.MgmtGeneral SetStockForAllyGroups(GridViewRow selectedRow, string userName)
{
ClsStockMgmt.MgmtGeneral obj = new ClsStockMgmt.MgmtGeneral();
obj.ProductNumber_Ally = CleanText(((HiddenField)selectedRow.FindControl("hidden_product_number")).Value);
obj.ProductQuantity_Ally = CleanText(selectedRow.Cells[12].Text);
obj.ProductRetailer_Ally = userName;
obj.ProductOwnerId_Ally = Session["userId"].ToString();
return obj;
}
// ClsStockMgmt.cs
public class MgmtGeneral
{
public string ProductNumber_Ally { get; set; }
public string ProductQuantity_Ally { get; set; }
public string Pay_Parent_Agent_Cd { get; set; }
public string ProductRetailer_Ally { get; set; }
public string ProductOwnerId_Ally { get; set; }
}
// do my stuff
but now I want to pass the values of GridViewRow to ClsStockMgmt.cs without calling the method of ClsStockMgmt suppose by making object of GridViewRow and pass to another class
. I want to change the approach of passing data.
Is it possible or not?
Reply
Answers (
1
)
Search using ajax json in mvc
Cannot call drodown list selected index change