public static COrnaments OrnamentsDetailGetById(int OrnamentsID) { try { COrnaments oResult = new COrnaments(); CShared oDBShared = new CShared(); // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsOrnamentsInfo = oDBShared.GetDataSet("TOrnamentsInfo", "uspOrnamentsInfoGet " + OrnamentsID); using (DataTable dtOrnamentsInfo = dsOrnamentsInfo.Tables["TOrnamentsInfo"]) { if (dtOrnamentsInfo.Rows.Count > 0) { oResult.OrnamentID = Convert.ToInt32(dtOrnamentsInfo.Rows[0]["OrnamentID"].ToString()); oResult.OrnamentPositionID = Convert.ToInt32(dtOrnamentsInfo.Rows[0]["PositionID"].ToString()); oResult.CategoryID = Convert.ToInt32(dtOrnamentsInfo.Rows[0]["CategoryID"].ToString()); oResult.Name = dtOrnamentsInfo.Rows[0]["Name"].ToString(); oResult.Description = dtOrnamentsInfo.Rows[0]["Description"].ToString(); oResult.OrnamentPositionName = dtOrnamentsInfo.Rows[0]["PositionName"].ToString(); oResult.Weight = dtOrnamentsInfo.Rows[0]["Weight"].ToString(); oResult.Cost = Convert.ToDecimal(dtOrnamentsInfo.Rows[0]["Cost"].ToString()); } return(oResult); } } catch (Exception ex) { throw ex; } }
public static CSQLResult OrnamentsDetailRemove(int id) { CSQLResult oResult = new CSQLResult(); try { CShared oDBShared = new CShared(); DataSet dsOrnamentsInfo = oDBShared.GetDataSet("TOrnamentsInfo", "uspOrnamentsDelete " + id); using (DataTable dtOrnamentsInfo = dsOrnamentsInfo.Tables["TOrnamentsInfo"]) { if (dtOrnamentsInfo != null && dtOrnamentsInfo.Rows.Count > 0) { oResult.Success = Convert.ToBoolean(dtOrnamentsInfo.Rows[0]["IsSuccess"]); oResult.Exception = dtOrnamentsInfo.Rows[0]["ErrorSuccessMsg"].ToString(); } } } catch (Exception ex) { //oResult.Success = false; //oResult.WasSuccessful = 0; //oResult.Exception = ex.Message; throw ex; } return(oResult); }
public static List <CCategory> CategoryDetailList() { try { List <CCategory> oResult = new List <CCategory>(); CShared oDBShared = new CShared(); // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsCategoryInfo = oDBShared.GetDataSet("TCategoryInfo", "uspCategoryInfoGet 0"); using (DataTable dtCategoryInfo = dsCategoryInfo.Tables["TCategoryInfo"]) { if (dtCategoryInfo.Rows.Count > 0) { for (int iRow = 0; iRow <= dtCategoryInfo.Rows.Count - 1; iRow++) { // SET THE DATASET INFORMATION TO THE RETURN VALUE oResult.Add(new CCategory() { CategoryID = Convert.ToInt32(dtCategoryInfo.Rows[iRow]["CategoryID"].ToString()), Name = dtCategoryInfo.Rows[iRow]["Name"].ToString(), Description = dtCategoryInfo.Rows[iRow]["Description"].ToString(), ImgPath = oDBShared.ImagePathGet(dtCategoryInfo.Rows[iRow]["LogoImage"].ToString(), 0, string.Empty), }); } } return(oResult); } } catch (Exception ex) { throw ex; } }
public static CCompany CompanyDetailGetById(int CompanyId) { try { CCompany oResult = new CCompany(); CShared oDBShared = new CShared(); // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsCompanyInfo = oDBShared.GetDataSet("TCompanyInfo", "uspCompanyInfoGet " + CompanyId); using (DataTable dtCompanyInfo = dsCompanyInfo.Tables["TCompanyInfo"]) { if (dtCompanyInfo.Rows.Count > 0) { oResult.CompanyID = Convert.ToInt64(dtCompanyInfo.Rows[0]["CompanyID"].ToString()); oResult.Name = dtCompanyInfo.Rows[0]["Name"].ToString(); oResult.Address = dtCompanyInfo.Rows[0]["Address"].ToString(); oResult.Email = dtCompanyInfo.Rows[0]["Email"].ToString(); oResult.Mobile = dtCompanyInfo.Rows[0]["Mobile"].ToString(); oResult.LogoImgPath = oDBShared.ImagePathGet(dtCompanyInfo.Rows[0]["LogoImage"].ToString(), 0, string.Empty); oResult.MasterUsername = dtCompanyInfo.Rows[0]["Username"].ToString(); oResult.MasterPassword = "******"; oResult.Status = dtCompanyInfo.Rows[0]["Status"].ToString(); oResult.LastLogged = Convert.ToDateTime(dtCompanyInfo.Rows[0]["LastLogged"].ToString()); oResult.LoginBeforeLastLogged = Convert.ToDateTime(dtCompanyInfo.Rows[0]["LoginBeforeLastLogged"].ToString()); } return(oResult); } } catch (Exception ex) { throw ex; } }
public static COrnamentsPosition OrnamentsPositionDetailGetById(int OrnamentsPositionID) { try { COrnamentsPosition oResult = new COrnamentsPosition(); CShared oDBShared = new CShared(); // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsOrnamentsPositionInfo = oDBShared.GetDataSet("TOrnamentsPositionInfo", "uspOrnamentsPositionInfoGet " + OrnamentsPositionID); using (DataTable dtOrnamentsPositionInfo = dsOrnamentsPositionInfo.Tables["TOrnamentsPositionInfo"]) { if (dtOrnamentsPositionInfo.Rows.Count > 0) { oResult.OrnamentPositionID = Convert.ToInt32(dtOrnamentsPositionInfo.Rows[0]["PositionID"].ToString()); oResult.CategoryID = Convert.ToInt32(dtOrnamentsPositionInfo.Rows[0]["CategoryID"].ToString()); oResult.Name = dtOrnamentsPositionInfo.Rows[0]["Name"].ToString(); oResult.Description = dtOrnamentsPositionInfo.Rows[0]["Description"].ToString(); oResult.ImgPath = oDBShared.ImagePathGet(dtOrnamentsPositionInfo.Rows[0]["LogoImage"].ToString(), 0, string.Empty); } return(oResult); } } catch (Exception ex) { throw ex; } }
public static List <CBranch> BranchDetailList(int CompanyID, int loginType) { try { List <CBranch> oResult = new List <CBranch>(); CShared oDBShared = new CShared(); string spParameter = string.Empty; if (loginType != Convert.ToInt32(LoginTypeCode.BRNACH_USER)) { spParameter = CompanyID + ", " + 0; } else { spParameter = 0 + ", " + CompanyID; } // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsBranchInfo = oDBShared.GetDataSet("TBranchInfo", "uspBranchInfoGet " + spParameter); using (DataTable dtBranchInfo = dsBranchInfo.Tables["TBranchInfo"]) { if (dtBranchInfo.Rows.Count > 0) { for (int iRow = 0; iRow <= dtBranchInfo.Rows.Count - 1; iRow++) { // SET THE DATASET INFORMATION TO THE RETURN VALUE oResult.Add(new CBranch() { BranchID = Convert.ToInt32(dtBranchInfo.Rows[iRow]["BranchID"].ToString()), CompanyID = Convert.ToInt32(dtBranchInfo.Rows[iRow]["CompanyID"].ToString()), Name = dtBranchInfo.Rows[iRow]["Name"].ToString(), Address = dtBranchInfo.Rows[iRow]["Address"].ToString(), Email = dtBranchInfo.Rows[iRow]["Email"].ToString(), Location = dtBranchInfo.Rows[iRow]["Location"].ToString(), Mobile = dtBranchInfo.Rows[iRow]["Mobile"].ToString(), Status = dtBranchInfo.Rows[iRow]["Status"].ToString(), LastLogged = Convert.ToDateTime(dtBranchInfo.Rows[iRow]["LastLogged"].ToString()), LoginBeforeLastLogged = Convert.ToDateTime(dtBranchInfo.Rows[iRow]["LoginBeforeLastLogged"].ToString()) }); } } return(oResult); } } catch (Exception ex) { throw ex; } }
public static CSQLResult BranchDetailSave(BranchModel branchModel, int ModifiedBy, int ModifiedSourceCode) { CSQLResult oResult = new CSQLResult(); try { CShared oDBShared = new CShared(); string ePassword = CShared.GetEncryptString(branchModel.Password); string spParameter = branchModel.BranchID + ", " + branchModel.CompanyID + ",'" + branchModel.Name + "','" + branchModel.Address + "','" + branchModel.Email + "','" + branchModel.Location + "','" + branchModel.Mobile + "','" + branchModel.Username + "','" + ePassword + "'," + ModifiedBy + "," + ModifiedBy + "," + ModifiedSourceCode; DataSet dsBranch = oDBShared.GetDataSet("TBranch", "uspBranchDetailSave " + spParameter); using (DataTable dtBranch = dsBranch.Tables["TBranch"]) { if (dtBranch != null && dtBranch.Rows.Count > 0) { oResult.Success = Convert.ToBoolean(dtBranch.Rows[0]["IsSuccess"]); oResult.Exception = dtBranch.Rows[0]["ErrorSuccessMsg"].ToString(); if (oResult.Success) { // SET OTHER PARAMETER INFORMATION //oResult.OtherParameter = dtCompany.Rows[0]["OrgPrjID"].ToString(); } } } } catch (Exception ex) { //oResult.Success = false; //oResult.WasSuccessful = 0; //oResult.Exception = ex.Message; throw ex; } return(oResult); }
public static CSQLResult CompanyDetailSave(CompanyModel companyModel, int ModifiedBy) { CSQLResult oResult = new CSQLResult(); try { CShared oDBShared = new CShared(); string ePassword = CShared.GetEncryptString(companyModel.MasterPassword); string spParameter = companyModel.CompanyID + ", '" + companyModel.Name + "','" + companyModel.Address + "','" + companyModel.Email + "','" + companyModel.Mobile + "','" + companyModel.LogoImgPath + "','" + companyModel.MasterUsername + "','" + ePassword + "'," + ModifiedBy + "," + ModifiedBy; DataSet dsCompany = oDBShared.GetDataSet("TCompany", "uspCompanySave " + spParameter); using (DataTable dtCompany = dsCompany.Tables["TCompany"]) { if (dtCompany != null && dtCompany.Rows.Count > 0) { oResult.Success = Convert.ToBoolean(dtCompany.Rows[0]["IsSuccess"]); oResult.Exception = dtCompany.Rows[0]["ErrorSuccessMsg"].ToString(); if (oResult.Success) { // SET OTHER PARAMETER INFORMATION //oResult.OtherParameter = dtCompany.Rows[0]["OrgPrjID"].ToString(); } } } } catch (Exception ex) { //oResult.Success = false; //oResult.WasSuccessful = 0; //oResult.Exception = ex.Message; throw ex; } return(oResult); }
public static CGeneralUser ForgotPassword(string Username, string Email) { CGeneralUser oResult = new CGeneralUser(); try { CShared oDBShared = new CShared(); DataSet dsLogin = oDBShared.GetDataSet("TForgotPassword", "uspForgotPassword '" + Username + "', '" + Email + "'"); using (DataTable dtForgot = dsLogin.Tables["TForgotPassword"]) { if (dtForgot != null && dtForgot.Rows.Count > 0) { if (Convert.ToBoolean(dtForgot.Rows[0]["Success"])) { // SEND EMAIL INCULUDING PASSCODE ON USER'S EMAIL ADDRESS string sUserEmail = dtForgot.Rows[0]["Email"].ToString(); string sPasscode = CShared.GetDecryptString(dtForgot.Rows[0]["Password"].ToString()); string sEmailBody = "<p>Greetings, <p>" + "<p>This is your passcode: <b> " + sPasscode + "</b> for Ornament Application.<p>" + "<p>Please use this passcode and login with Ornament app!<p>" + "<p>Regards,</p>" + "<p>Invisible Fiction.</p>"; //SEND EMAIL WITH NEW PASSWORD oDBShared.SendEmail("Forgot Password|" + sUserEmail + "", "", "", "Your Passcode For Ornament App.", sEmailBody); oResult.Success = Convert.ToBoolean(dtForgot.Rows[0]["Success"]); oResult.WasSuccessful = Convert.ToInt32(dtForgot.Rows[0]["Success"]); oResult.Exception = dtForgot.Rows[0]["ErrorSuccessMsg"].ToString(); } else { oResult.Success = Convert.ToBoolean(dtForgot.Rows[0]["Success"]); oResult.WasSuccessful = Convert.ToInt32(dtForgot.Rows[0]["Success"]); oResult.Exception = dtForgot.Rows[0]["ErrorSuccessMsg"].ToString(); } } } return(oResult); } catch (Exception ex) { throw ex; } }
public static CGeneralUser Login(string UserName, string PassWord) { CGeneralUser oResult = new CGeneralUser(); try { CShared oDBShared = new CShared(); string ePassword = CShared.GetEncryptString(PassWord); DataSet dsLogin = oDBShared.GetDataSet("TLogin", "uspLogin '" + UserName + "', '" + ePassword + "'"); using (DataTable dtLogin = dsLogin.Tables["TLogin"]) { if (dtLogin != null && dtLogin.Rows.Count > 0) { if (Convert.ToBoolean(dtLogin.Rows[0]["Success"])) { // TRUE FOR ORGANIZATION oResult.DisplayName = dtLogin.Rows[0]["DisplayName"].ToString(); oResult.UserID = Convert.ToInt32(dtLogin.Rows[0]["UserID"]); oResult.LoginTypeCode = Convert.ToInt32(dtLogin.Rows[0]["LoginTypeCode"]); oResult.LastLogged = Convert.ToDateTime(dtLogin.Rows[0]["LastLogged"]).ToString("MM/dd/yyyy h:mm tt"); oResult.Success = Convert.ToBoolean(dtLogin.Rows[0]["Success"]); oResult.WasSuccessful = Convert.ToInt32(dtLogin.Rows[0]["Success"]); oResult.Exception = dtLogin.Rows[0]["ErrorSuccessMsg"].ToString(); } // FAILED TO LOGIN else { oResult.Success = Convert.ToBoolean(dtLogin.Rows[0]["Success"]); oResult.WasSuccessful = Convert.ToInt32(dtLogin.Rows[0]["Success"]); oResult.Exception = dtLogin.Rows[0]["ErrorSuccessMsg"].ToString(); } } } } catch (Exception ex) { //oResult.Success = false; //oResult.WasSuccessful = 0; //oResult.Exception = ex.Message; throw ex; } return(oResult); }
public static CSQLResult OrnamentsPositionDetailSave(OrnamentsPositionModel ornamentsPositionModel, int ModifiedBy, int ModifiedSourceCode) { CSQLResult oResult = new CSQLResult(); try { CShared oDBShared = new CShared(); string spParameter = ornamentsPositionModel.OrnamentPositionID + "," + ornamentsPositionModel.CategoryID + ", '" + ornamentsPositionModel.Name + "','" + ornamentsPositionModel.Description + "','" + ornamentsPositionModel.ImgPath + "'," + ModifiedBy + "," + ModifiedBy + "," + ModifiedSourceCode; DataSet dsOrnamentsPosition = oDBShared.GetDataSet("TOrnamentsPosition", "uspPositionDetailSave " + spParameter); using (DataTable dtOrnamentsPosition = dsOrnamentsPosition.Tables["TOrnamentsPosition"]) { if (dtOrnamentsPosition != null && dtOrnamentsPosition.Rows.Count > 0) { oResult.Success = Convert.ToBoolean(dtOrnamentsPosition.Rows[0]["IsSuccess"]); oResult.Exception = dtOrnamentsPosition.Rows[0]["ErrorSuccessMsg"].ToString(); if (oResult.Success) { // SET OTHER PARAMETER INFORMATION //oResult.OtherParameter = dtCompany.Rows[0]["OrgPrjID"].ToString(); } } } } catch (Exception ex) { //oResult.Success = false; //oResult.WasSuccessful = 0; //oResult.Exception = ex.Message; throw ex; } return(oResult); }
public static CDashboard DashBoardDetail() { CDashboard oResult = new CDashboard(); try { CShared oDBShared = new CShared(); DataSet dsDashboard = oDBShared.GetDataSet("TDashBoard", "uspDashboardDetail"); using (DataTable dtDashboard = dsDashboard.Tables["TDashBoard"]) { if (dtDashboard != null && dtDashboard.Rows.Count > 0) { if (Convert.ToBoolean(dtDashboard.Rows[0]["Success"])) { // TRUE FOR ORGANIZATION oResult.CompanyCount = Convert.ToInt32(dtDashboard.Rows[0]["CompanyCount"]); oResult.CategoryCount = Convert.ToInt32(dtDashboard.Rows[0]["CategoryCount"]); oResult.PositionCount = Convert.ToInt32(dtDashboard.Rows[0]["OrnamentPositionCount"]); oResult.OrnamentCount = Convert.ToInt32(dtDashboard.Rows[0]["OrnamentCount"]); oResult.Success = Convert.ToBoolean(dtDashboard.Rows[0]["Success"]); oResult.WasSuccessful = Convert.ToInt32(dtDashboard.Rows[0]["Success"]); oResult.Exception = dtDashboard.Rows[0]["ErrorSuccessMsg"].ToString(); } else { oResult.Success = Convert.ToBoolean(dtDashboard.Rows[0]["Success"]); oResult.WasSuccessful = Convert.ToInt32(dtDashboard.Rows[0]["Success"]); oResult.Exception = dtDashboard.Rows[0]["ErrorSuccessMsg"].ToString(); } } } } catch (Exception ex) { //oResult.Success = false; //oResult.WasSuccessful = 0; //oResult.Exception = ex.Message; throw ex; } return(oResult); }
public static List <COrnaments> OrnamentsDetailList() { try { List <COrnaments> oResult = new List <COrnaments>(); CShared oDBShared = new CShared(); // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsOrnamentsInfo = oDBShared.GetDataSet("TOrnamentsInfo, TImages", "uspOrnamentsInfoGet 0"); using (DataTable dtOrnamentsInfo = dsOrnamentsInfo.Tables["TOrnamentsInfo"]) { if (dtOrnamentsInfo.Rows.Count > 0) { for (int iRow = 0; iRow <= dtOrnamentsInfo.Rows.Count - 1; iRow++) { // SET THE DATASET INFORMATION TO THE RETURN VALUE oResult.Add(new COrnaments() { CategoryID = Convert.ToInt32(dtOrnamentsInfo.Rows[iRow]["CategoryID"].ToString()), OrnamentPositionID = Convert.ToInt32(dtOrnamentsInfo.Rows[iRow]["PositionID"].ToString()), OrnamentID = Convert.ToInt32(dtOrnamentsInfo.Rows[iRow]["OrnamentID"].ToString()), Name = dtOrnamentsInfo.Rows[iRow]["Name"].ToString(), CategoryName = dtOrnamentsInfo.Rows[iRow]["CategoryName"].ToString(), Description = dtOrnamentsInfo.Rows[iRow]["Description"].ToString(), OrnamentPositionName = dtOrnamentsInfo.Rows[iRow]["PositionName"].ToString(), Weight = dtOrnamentsInfo.Rows[iRow]["Weight"].ToString(), Cost = Convert.ToDecimal(dtOrnamentsInfo.Rows[iRow]["Cost"].ToString()) }); } } return(oResult); } } catch (Exception ex) { throw ex; } }
// SAVE ORGANIZATION PROJECT SEARCH public static List <CCompany> CompanyDetailList(int AdminUserId) { try { List <CCompany> oResult = new List <CCompany>(); CShared oDBShared = new CShared(); // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsCompanyInfo = oDBShared.GetDataSet("TCompanyInfo", "uspCompanyInfoGet " + 0); using (DataTable dtCompanyInfo = dsCompanyInfo.Tables["TCompanyInfo"]) { if (dtCompanyInfo.Rows.Count > 0) { for (int iRow = 0; iRow <= dtCompanyInfo.Rows.Count - 1; iRow++) { // SET THE DATASET INFORMATION TO THE RETURN VALUE oResult.Add(new CCompany() { CompanyID = Convert.ToInt64(dtCompanyInfo.Rows[iRow]["CompanyID"].ToString()), Name = dtCompanyInfo.Rows[iRow]["Name"].ToString(), Address = dtCompanyInfo.Rows[iRow]["Address"].ToString(), Email = dtCompanyInfo.Rows[iRow]["Email"].ToString(), Mobile = dtCompanyInfo.Rows[iRow]["Mobile"].ToString(), LogoImgPath = oDBShared.ImagePathGet(dtCompanyInfo.Rows[iRow]["LogoImage"].ToString(), 0, string.Empty), Status = dtCompanyInfo.Rows[iRow]["Status"].ToString(), LastLogged = Convert.ToDateTime(dtCompanyInfo.Rows[iRow]["LastLogged"].ToString()), LoginBeforeLastLogged = Convert.ToDateTime(dtCompanyInfo.Rows[iRow]["LoginBeforeLastLogged"].ToString()) }); } } return(oResult); } } catch (Exception ex) { throw ex; } }
public static List <CCode> getCodeByCodeType(int CodeTypeId) { try { CShared oDBShared = new CShared(); List <CCode> oCode = new List <CCode>(); DataSet dsCode = oDBShared.GetDataSet("TCode", "uspQueryGet " + CodeTypeId); using (DataTable dtCode = dsCode.Tables["TCode"]) { if (dtCode != null && dtCode.Rows.Count > 0) { oCode = CShared.DataTableToList <CCode>(dtCode); } } return(oCode); } catch (Exception ex) { throw ex; } }
public static CBranch BranchDetailGetById(int BranchID) { try { CBranch oResult = new CBranch(); CShared oDBShared = new CShared(); string spParameter = 0 + ", " + BranchID; // SELECT THE INFORMATION FROM THE STORE-PROCEDURE AND SET INFORMATION TO THE DATASET DataSet dsBranchInfo = oDBShared.GetDataSet("TBranchInfo", "uspBranchInfoGet " + spParameter); using (DataTable dtBranchInfo = dsBranchInfo.Tables["TBranchInfo"]) { if (dtBranchInfo.Rows.Count > 0) { oResult.BranchID = Convert.ToInt32(dtBranchInfo.Rows[0]["BranchID"].ToString()); oResult.CompanyID = Convert.ToInt32(dtBranchInfo.Rows[0]["CompanyID"].ToString()); oResult.Name = dtBranchInfo.Rows[0]["Name"].ToString(); oResult.Address = dtBranchInfo.Rows[0]["Address"].ToString(); oResult.Email = dtBranchInfo.Rows[0]["Email"].ToString(); oResult.Location = dtBranchInfo.Rows[0]["Location"].ToString(); oResult.Mobile = dtBranchInfo.Rows[0]["Mobile"].ToString(); oResult.Username = dtBranchInfo.Rows[0]["Username"].ToString(); oResult.Password = "******"; oResult.Status = dtBranchInfo.Rows[0]["Status"].ToString(); oResult.LastLogged = Convert.ToDateTime(dtBranchInfo.Rows[0]["LastLogged"].ToString()); oResult.LoginBeforeLastLogged = Convert.ToDateTime(dtBranchInfo.Rows[0]["LoginBeforeLastLogged"].ToString()); } return(oResult); } } catch (Exception ex) { throw ex; } }
//public static List<CCountry> GetCountry() //{ // try // { // List<CCountry> oCountry = new List<CCountry>(); // DataSet dsCode = CGlobal.oDBShared.GetDataSet("TCountry", "uspQueryGet_Web 'GetCountry'"); // using (DataTable dtCode = dsCode.Tables["TCountry"]) // { // if (dtCode != null && dtCode.Rows.Count > 0) // { // oCountry = CShared.DataTableToList<CCountry>(dtCode); // } // } // return oCountry; // } // catch (Exception ex) // { // throw ex; // } //} public static List <CCompany> GetComapnyList(int AdminUserId) { try { List <CCompany> oCompany = new List <CCompany>(); CShared oDBShared = new CShared(); DataSet dsCompany = oDBShared.GetDataSet("TCompanyInfo", "uspCompanyInfoGet 0"); using (DataTable dtCompany = dsCompany.Tables["TCompanyInfo"]) { if (dtCompany != null && dtCompany.Rows.Count > 0) { oCompany = CShared.DataTableToList <CCompany>(dtCompany); } } return(oCompany); } catch (Exception ex) { throw ex; } }