public List <Client_AccountManager> getClient_AccountManager(int clientId) { _param = new SqlParameter[] { new SqlParameter("@clientId", clientId) }; _dt = _sf.returnDTWithProc_executeReader("p_tblClient_AccountManager_get", _param); List <Client_AccountManager> listAM = new List <Client_AccountManager>(); if (_dt.Rows.Count > 0) { foreach (DataRow row in _dt.Rows) { Client_AccountManager am = new Client_AccountManager(); am.c_amId = Convert.ToInt32(row["c_amId"]); am.clientId = Convert.ToInt32(row["clientId"]); am.accountManager = Convert.ToString(row["accountManager"]); am.contactNo = Convert.ToString(row["contactNo"]); am.emailId = Convert.ToString(row["emailId"]); listAM.Add(am); } } return(listAM); }
public int saveClient_AccountManager(Client_AccountManager am) { _param = new SqlParameter[] { new SqlParameter("@c_amId", am.c_amId), new SqlParameter("@clientId", am.clientId), new SqlParameter("@accountManager", am.accountManager), new SqlParameter("@contactNo", am.contactNo), new SqlParameter("@emailId", am.emailId) }; return(_sf.executeNonQueryWithProc("p_tblClient_AccountManager_save", _param)); }