public JsonResult ServicePkgesDetailsCharges(int ServiceID, string ServiceType)
        {
            HospitalLocation();
            string TableColumnsWordIDName = "";

            KeystoneProject.Buisness_Logic.Master.BL_ServicesPackage Bl_obj = new Buisness_Logic.Master.BL_ServicesPackage();
            List <Services>        search   = new List <Services>();
            List <ServicesPackage> objmodel = new List <ServicesPackage>();

            dsServicesNTests = Bl_obj.GetServicesPackageforServiceNTest();

            AddServicesPackagesMod.dsServicePackagesCharges = BindServicePackagesCharges(ServiceID);
            decimal GeneralCharges = 0;


            foreach (DataRow dr in AddServicesPackagesMod.dsServicePackagesCharges.Tables[1].Rows)
            {
                objmodel.Add(new ServicesPackage
                {
                    ServiceID = Convert.ToInt32(dr["ServiceID"].ToString()),

                    ServiceOrTestID          = Convert.ToInt32(dr["ServiceOrTestID"].ToString()),
                    ServiceOrTestName        = dr["ServiceOrTestName"].ToString(),
                    Quantity                 = Convert.ToInt32(dr["Quantity"].ToString()),
                    ServiceType              = dr["ServiceType"].ToString(),
                    ServiceDetailsPackagelID = Convert.ToInt32(dr["ServiceDetailsPackagelID"].ToString())
                });
            }

            var modeladd = new List <dynamic>(AddServicesPackagesMod.dsServicePackagesCharges.Tables[0].Rows.Count);

            foreach (DataRow row in AddServicesPackagesMod.dsServicePackagesCharges.Tables[0].Rows)
            {
                var obj = (IDictionary <string, object>) new ExpandoObject();

                foreach (DataColumn col in AddServicesPackagesMod.dsServicePackagesCharges.Tables[0].Columns)
                {
                    obj.Add(col.ColumnName, row[col]);
                }

                modeladd.Add(obj);
            }

            return(Json(new { modeladd = modeladd, objmodel = objmodel }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult TableFromCharges(int ServiceOrTestID, string ServiceType)
        {
            HospitalLocation();
            string TableColumnsWordIDName = "";

            KeystoneProject.Buisness_Logic.Master.BL_ServicesPackage Bl_obj = new Buisness_Logic.Master.BL_ServicesPackage();
            List <Services> search = new List <Services>();

            dsServicesNTests = Bl_obj.GetServicesPackageforServiceNTest();

            AddServiceMod.dsServicesCharges = BindServiceCharges();
            decimal GeneralCharges = 0;



            dsServicesNTests = Bl_obj.GetServiceDetailsPackage(ServiceOrTestID);
            int     count  = 1;
            DataSet dsWord = BindServiceCharges();

            var modeladd = new List <dynamic>(AddServiceMod.dsServicesCharges.Tables[0].Rows.Count);
            var rowcount = 0;

            foreach (DataRow row in AddServiceMod.dsServicesCharges.Tables[0].Rows)
            {
                var obj = (IDictionary <string, object>) new ExpandoObject();
                rowcount = 0;
                foreach (DataColumn col in AddServiceMod.dsServicesCharges.Tables[0].Columns)
                {
                    string col1 = dsServicesNTests.Tables[1].Rows[rowcount]["GeneralCharges"].ToString();
                    obj.Add(col.ColumnName, dsServicesNTests.Tables[1].Rows[rowcount]["GeneralCharges"]);
                    rowcount++;
                }

                modeladd.Add(obj);
            }



            return(new JsonResult {
                Data = modeladd, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }
        public JsonResult GetServicesPackageforServiceNTest()
        {
            KeystoneProject.Buisness_Logic.Master.BL_ServicesPackage Bl_obj = new Buisness_Logic.Master.BL_ServicesPackage();

            dsServicesNTests = Bl_obj.GetServicesPackageforServiceNTest();

            List <Services> search = new List <Services>();

            foreach (DataRow dr in dsServicesNTests.Tables[0].Rows)
            {
                search.Add(new Services
                {
                    ServiceID   = Convert.ToInt32(dr["ServiceID"]),
                    ServiceName = dr["ServiceName"].ToString(),
                });
            }
            return(new JsonResult {
                Data = search, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }