public JsonResult GetServiceDetailsWardWise1(int ServiceID)
        {
            KeystoneProject.Buisness_Logic.Master.BL_ServicesPackage Bl_obj = new Buisness_Logic.Master.BL_ServicesPackage();

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

            foreach (DataRow ds in dsServicesNTests.Tables[1].Rows)
            {
            }

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

            foreach (DataRow dr in dsServicesNTests.Tables[1].Rows)
            {
                search.Add(new ServicesPackage
                {
                    SPWchargeID      = dr["ServiceName"].ToString(),
                    ServicePackageID = dr["ServicePackageID"].ToString(),
                    ServiceType      = dr["ServiceType"].ToString(),
                    ServiceOrTestID  = Convert.ToInt32(dr["ServiceOrTestID"]),
                    WardID           = Convert.ToInt32(dr["WardID"]),
                    WardName         = dr["WardName"].ToString(),
                    Quantity         = Convert.ToInt32(dr["Quantity"]),
                    GeneralCharges   = Convert.ToInt32(dr["GeneralCharges"]),
                });
            }


            return(new JsonResult {
                Data = search, JsonRequestBehavior = 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
            });
        }