コード例 #1
0
 private void LoadDistributorsMonthly()
 {
     CD_DomainContext context = new CD_DomainContext();
     string cdIds = DBUtils.Get_CD_ProductIDs(Utils.GetBrandCode(_productBrand));
     if (GetDosageSaCodes() != "")
         cdIds = DBUtils.GetCdProductIds(GetDosageSaCodes());
     DateTime start = new DateTime(_startYear, _startMonth, 1);
     DateTime end = new DateTime(_endYear, _endMonth, 1).AddMonths(1).AddSeconds(-1);
     if (this._regionType == SanofiRegionTypes.Province)
         context.Load(context.GetProvince_PerDistributorQuery(cdIds, start,end , DBUtils.Get_CD_ProvinceIds(_groupRegionMapId, _productBrand)), ProvincePerDistributor_ResultCallback, null);
     else if (this._regionType == SanofiRegionTypes.TotalIR)
         context.Load(context.GetTotal_PerDistributorQuery(cdIds, start, end), TotalPerDistributor_ResultCallack, null);
 }