public static string LoadCategory(string BranchID) { SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString); SqlDataAdapter da = new SqlDataAdapter("select * from AccountsType where BranchID='" + BranchID + "'", Conn); DataSet ds = new DataSet(); da.Fill(ds); List <GetRegionClasss> RegionList = new List <GetRegionClasss>(); RegionList.Clear(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { GetRegionClasss dbdc = new GetRegionClasss(); dbdc.UnitTypeID = ds.Tables[0].Rows[i][0].ToString(); dbdc.UnitTypeDesc = ds.Tables[0].Rows[i][1].ToString(); RegionList.Insert(i, dbdc); } } JavaScriptSerializer jser = new JavaScriptSerializer(); return(jser.Serialize(RegionList)); }
public static string LoadRegionCombo1(string BranchID) { SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString); SqlParameter Branch = new SqlParameter("@BranchID", BranchID); DataSet ds = AACommon.ReturnDatasetBySP("ITM_UNIT_TYPE_Get", Conn, Branch); List <GetRegionClasss> RegionList = new List <GetRegionClasss>(); RegionList.Clear(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { GetRegionClasss dbdc = new GetRegionClasss(); dbdc.UnitTypeID = ds.Tables[0].Rows[i][0].ToString(); dbdc.UnitTypeDesc = ds.Tables[0].Rows[i][1].ToString(); RegionList.Insert(i, dbdc); } } JavaScriptSerializer jser = new JavaScriptSerializer(); return(jser.Serialize(RegionList)); }
public static string LoadRegion() { SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString); DataSet ds = AACommon.ReturnDatasetBySPWithoutParameter("SP_Area_Get", Conn); List <GetRegionClasss> RegionList = new List <GetRegionClasss>(); RegionList.Clear(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { GetRegionClasss dbdc = new GetRegionClasss(); dbdc.AreaID = ds.Tables[0].Rows[i][0].ToString(); dbdc.AreaTitle = ds.Tables[0].Rows[i][1].ToString(); dbdc.TalukaID = ds.Tables[0].Rows[i][2].ToString(); RegionList.Insert(i, dbdc); } } JavaScriptSerializer jser = new JavaScriptSerializer(); return(jser.Serialize(RegionList)); }
public static string LoadRMbValue(string BranchID) { SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString); List <GetRegionClasss> RegionList = new List <GetRegionClasss>(); SqlDataAdapter da = new SqlDataAdapter("Select RMBValue from CurrencyConversion where IsActive=1 and BranchID='" + BranchID + "'", Conn); DataSet ds = new DataSet(); da.Fill(ds); RegionList.Clear(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { GetRegionClasss dbdc = new GetRegionClasss(); dbdc.UnitTypeID = ds.Tables[0].Rows[i][0].ToString(); RegionList.Insert(i, dbdc); } } JavaScriptSerializer jser = new JavaScriptSerializer(); return(jser.Serialize(RegionList)); }
public static string LoadRegion() { SqlConnection Conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Con"].ConnectionString); DataSet ds = AACommon.ReturnDatasetBySPWithoutParameter("ITM_UNIT_Get", Conn); List <GetRegionClasss> RegionList = new List <GetRegionClasss>(); RegionList.Clear(); if (ds.Tables[0].Rows.Count > 0) { for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { GetRegionClasss dbdc = new GetRegionClasss(); dbdc.UnitID = ds.Tables[0].Rows[i][0].ToString(); dbdc.UnitTitle = ds.Tables[0].Rows[i][1].ToString(); dbdc.DisplayName = ds.Tables[0].Rows[i][2].ToString(); dbdc.UnitTypeID = ds.Tables[0].Rows[i][3].ToString(); dbdc.IsBase = ds.Tables[0].Rows[i][4].ToString(); dbdc.BaseMultiplier = ds.Tables[0].Rows[i][5].ToString(); RegionList.Insert(i, dbdc); } } JavaScriptSerializer jser = new JavaScriptSerializer(); return(jser.Serialize(RegionList)); }