protected void FillMaster(DataTable masterTable, DataTable detailTable) { md = new MasterDetails[masterTable.Rows.Count]; for (int i = 0; i < masterTable.Rows.Count; i++) { md[i] = new MasterDetails(); DataRow row = masterTable.Rows[i]; CAPTxtIEMaster oMaster = new CAPTxtIEMaster(); oMaster.RecType = "HH"; oMaster.Location = row["Location"].ToString(); oMaster.Operator = row["StaffNumber"].ToString(); oMaster.RecvDate = Convert.ToDateTime(row["TxDate"]); oMaster.Supplier = row["SupplierCode"].ToString(); oMaster.RefNumber = row["Reference"].ToString(); oMaster.Remarks = row["Remarks"].ToString(); oMaster.TxNumber = row["TxNumber"].ToString(); md[i].Master = oMaster; headerCount++; FillDetails(detailTable, row["HeaderId"].ToString(), ref md[i]); } }
public IEnumerable <ResultIP> RunningRevenuePerAccountCat(DateTime Fromdate, DateTime ToDate, int[] facilityId) { var facilities = string.Join(",", facilityId); //var objDetails = SqlMapper.QueryMultiple(con, "PayorMixCountVsRevenueOPD", commandType: CommandType.StoredProcedure); var objDetails = SqlMapper.QueryMultiple(con, "RunningRevenueWeeklySummaryServiceWise", new { Fromdate = Fromdate, ToDate = ToDate, @intFacilityId = facilities, inyHospitalLocationId = 1 }, null, 1000, commandType: CommandType.StoredProcedure); MasterDetails ObjMaster = new MasterDetails(); //Assigning each Multiple tables data to specific single model class ObjMaster.RevenueByCat = objDetails.Read <RevenueByAccountCat>().ToList(); //List<RevenueByAccountCat> IprevList = new List<RevenueByAccountCat>(); var dt = ConvertToDataTable(ObjMaster.RevenueByCat); var result = from tab in dt.AsEnumerable() group tab by tab["CompanyTypeName"] into groupDt select new ResultIP { CompanyTypeName = groupDt.Key.ToString(), IPNetAmt = groupDt.Sum((r) => Math.Round(decimal.Parse(r["IPNetAmt"].ToString()), 2)) }; con.Close(); return(result); }
public ActionResult SetLogo(int shopId, HttpPostedFileBase logoImage) { if (Request.Files.Count > 0) { HttpPostedFileBase Files = Request.Files[0]; Tuple <int, byte[]> FileStatus = new Tuple <int, byte[]>(0, new byte[0]); Enums.FileValidateStatus fileStatus = ValidateFiles(Request.Files, Enums.FileType.Image, 1024, 1); if (Files != null && fileStatus == Enums.FileValidateStatus.ValidFile) { FileStatus = GlobalMethod.FileUpload(Files, Files.FileName, Resource.Module_ShopLogo, shopId); } ReturnFileAlertMessage(fileStatus); if (FileStatus.Item1 > 0) { MasterDetails _details = new MasterDetails(); _details.DeleteLogo(shopId, Resource.Module_ShopLogo, FileStatus.Item1); SetAlertMessage(Resource.File_Uploaded, Enums.AlertType.success); } } else { SetAlertMessage(Resource.File_Not_Selected, Enums.AlertType.danger); } return(View("GetLogo")); }
public QuickQuote GetChildObjects(out MasterDetails outputMasterData) { _vehicleInfo.ColorList = new List <string>(); _vehicleInfo.VehicleModelList = new List <string>(); _vehicleInfo.VehicleTypeList = new List <string>(); _vehicleInfo.TransmissionTypeList = new List <string>(); _quickQuote.PolicyDetails = new Policy(); _quickQuote.LicenseDetails = new License(); try { GetMasterDetails(); bool isMasterDataAvailable = _masterDetails != null; _vehicleInfo.VehicleMakeList = isMasterDataAvailable ? _masterDetails.masterData.motor.vehicle.Make.ToList() : new List <string>(); _vehicleInfo.VehicleUsageList = isMasterDataAvailable ? _masterDetails.masterData.motor.vehicle.Usage.ToList() : new List <string>(); _insuredInfo.CityList = isMasterDataAvailable ? _masterDetails.masterData.cities.ToList() : new List <string>(); _quickQuote.VehicleDetails = _vehicleInfo; _quickQuote.InsuredDetails = _insuredInfo; outputMasterData = isMasterDataAvailable ? _masterDetails : null; } catch (Exception ex) { _vehicleInfo.VehicleMakeList = new List <string>(); _vehicleInfo.VehicleUsageList = new List <string>(); _insuredInfo.CityList = new List <string>(); _quickQuote.VehicleDetails = _vehicleInfo; _quickQuote.InsuredDetails = _insuredInfo; outputMasterData = null; } return(_quickQuote); }
protected void FillDetails(DataTable detailTable, string headerId, ref MasterDetails mDetail) { DataRow[] rows = detailTable.Select("HeaderId = '" + headerId + "'"); if (rows.Length > 0) { mDetail.Details = new object[rows.Length]; for (int i = 0; i < rows.Length; i++) { DataRow row = rows[i]; CAPTxtIEDetails oDetail = new CAPTxtIEDetails(); oDetail.RecType = "DD"; oDetail.StockCode = row["STKCODE"].ToString(); oDetail.Appendix1 = row["APPENDIX1"].ToString(); oDetail.Appendix2 = row["APPENDIX2"].ToString(); oDetail.Appendix3 = row["APPENDIX3"].ToString(); //oDetail.ReceivedQty = Convert.ToInt32(((decimal)row["Qty"]).ToString("n0")); oDetail.ReceivedQty = Convert.ToInt32((decimal)row["Qty"]); oDetail.ReceivedUnitAmount = (decimal)row["UnitAmount"]; mDetail.Details[i] = oDetail; detailsCount++; } } }
protected void FillMaster(DataTable masterTable, DataTable detailTable) { md = new MasterDetails[masterTable.Rows.Count]; for (int i = 0; i < masterTable.Rows.Count; i++) { md[i] = new MasterDetails(); DataRow row = masterTable.Rows[i]; TxferTxtIEMaster oMaster = new TxferTxtIEMaster(); oMaster.RecType = "HH"; oMaster.FromLocation = row["FromLocation"].ToString(); oMaster.ToLocation = row["ToLocation"].ToString(); oMaster.Operator = row["StaffNumber"].ToString(); oMaster.TxDate = Convert.ToDateTime(row["TxDate"]); oMaster.TxferDate = Convert.ToDateTime(row["TransferredOn"]); oMaster.CompletionDate = Convert.ToDateTime(row["CompletedOn"]); oMaster.RefNumber = row["Reference"].ToString(); oMaster.Remarks = row["Remarks"].ToString(); md[i].Master = oMaster; FillDetails(detailTable, row["HeaderId"].ToString(), ref md[i]); } }
/// <summary> /// Generates a product string for one of the columns in the output file which can be imported into Magento /// </summary> /// <param name="record">a PaypalRecord</param> /// <param name="startNumber"></param> /// <returns></returns> public static string CreateProductsString(MasterDetails recordMS, int startNumber) { //generate m.products var record = (PaypalRecord)recordMS.Master; StringBuilder products = new StringBuilder(); products.Append("\"a:{num}:{"); var replaceditemTitles = record.ItemTitle.Replace("],", "];"); var itemTitles = replaceditemTitles.Split(';'); var itemIDs = record.ItemID.Split(','); var itemCount = itemIDs.Length; for (int x = 0; x < itemCount; ++x) { var itemcountlength = x.ToString().Length.ToString(); var itemdescription = itemTitles[x]; var itemdescriptionlength = itemdescription.Length.ToString(); var itemID = System.Convert.ToDouble(itemIDs[x]); StringBuilder product = new StringBuilder(); product.Append(@"i:{x};a:43:{s:9:""""entity_id"""";s:{itemcountlength}:""""{itemcount}"""";s:14:""""parent_item_id"""";N;s:3:""""sku"""";s:10:""""{SKU}"""";s:15:""""product_options"""";a:1:{s:15:""""info_buyRequest"""";a:1:{s:3:""""qty"""";i:1;}}s:6:""""weight"""";N;s:10:""""is_virtual"""";s:1:""""0"""";s:4:""""name"""";s:{itemdescriptionlength}:""""{itemdescription}"""";s:11:""""description"""";N;s:15:""""additional_data"""";s:141:""""a:1:{s:16:""""m2epro_extension"""";a:1:{s:5:""""items"""";a:1:{i:0;a:2:{s:7:""""item_id"""";s:12:""""{itemID}"""";s:14:""""transaction_id"""";s:13:""""1166311965018"""";}}}}"""";s:13:""""free_shipping"""";s:1:""""0"""";s:14:""""is_qty_decimal"""";N;s:11:""""no_discount"""";s:1:""""0"""";s:15:""""qty_backordered"""";N;s:12:""""qty_canceled"""";s:6:""""0.0000"""";s:12:""""qty_invoiced"""";s:6:""""1.0000"""";s:11:""""qty_ordered"""";s:6:""""1.0000"""";s:12:""""qty_refunded"""";s:6:""""0.0000"""";s:11:""""qty_shipped"""";s:6:""""1.0000"""";s:4:""""cost"""";N;s:6:""""status"""";s:7:""""Shipped"""";s:14:""""original_price"""";s:7:""""{price}"""";s:5:""""price"""";s:7:""""{price}"""";s:10:""""base_price"""";s:7:""""{price}"""";s:3:""""qty"""";N;s:19:""""base_original_price"""";s:7:""""{price}"""";s:11:""""tax_percent"""";s:6:""""0.0000"""";s:10:""""tax_amount"""";s:6:""""0.0000"""";s:15:""""base_tax_amount"""";s:6:""""0.0000"""";s:12:""""tax_invoiced"""";s:6:""""0.0000"""";s:17:""""base_tax_invoiced"""";s:6:""""0.0000"""";s:16:""""discount_percent"""";s:6:""""0.0000"""";s:15:""""discount_amount"""";s:6:""""0.0000"""";s:20:""""base_discount_amount"""";s:6:""""0.0000"""";s:22:""""base_discount_invoiced"""";s:6:""""0.0000"""";s:15:""""amount_refunded"""";s:6:""""0.0000"""";s:20:""""base_amount_refunded"""";s:6:""""0.0000"""";s:9:""""row_total"""";s:7:""""{price}"""";s:14:""""base_row_total"""";s:7:""""{price}"""";s:12:""""row_invoiced"""";s:7:""""{price}"""";s:17:""""base_row_invoiced"""";s:7:""""{price}"""";s:10:""""row_weight"""";s:6:""""0.0000"""";s:24:""""base_tax_before_discount"""";N;s:19:""""tax_before_discount"""";N;}"); product.Replace("{x}", x.ToString()); product.Replace("{itemcountlength}", itemcountlength); product.Replace("{itemcount}", (x + startNumber).ToString()); var ebayItem = StringFunctions.ParseEbayItem(itemdescription); product.Replace("{SKU}", StringFunctions.GetSKUFromItem(ebayItem)); product.Replace("{itemdescriptionlength}", itemdescriptionlength); product.Replace("{itemdescription}", itemdescription); product.Replace("{itemID}", itemID.ToString()); product.Replace("{price}", record.Gross.ToString("N4")); products.Append(product); } products.Replace("{num}", itemCount.ToString()); products.Append("}\""); return(products.ToString()); }
public ActionResult UpdateExpenseType(ExpTypeModel model) { if (ModelState.IsValid) { MasterDetails masterDetails = new MasterDetails(); ReturnAlertMessage(masterDetails.SetExpType(model, CrudType.Update)); } return(RedirectToAction("AddExpenseType")); }
public ActionResult DeleteExpenseItem(ExpItemModel model) { if (ModelState.IsValid) { MasterDetails masterDetails = new MasterDetails(); ReturnAlertMessage(masterDetails.SetExpItem(model, CrudType.Delete)); } return(RedirectToAction("AddExpenseItem")); }
public ActionResult DeleteNotification(NotificationDbModel model) { if (ModelState.IsValid) { _details = new MasterDetails(); Enums.CrudStatus status = _details.SetNotification(model, Enums.CrudType.Delete); ReturnAlertMessage(status); } return(RedirectToAction("GetNotification")); }
public ActionResult UpdateShop(ShopModel model) { if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetShop(model, Enums.CrudType.Update); ReturnAlertMessage(status); } return(View("GetShop")); }
public ActionResult SetNotificationType(NotificationTypeModel model) { if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetNotificationType(model, Enums.CrudType.Insert); ReturnAlertMessage(status); } return(RedirectToAction("GetNotificationType")); }
public ActionResult DeleteCheque(ChequeModel model) { if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetCheque(model, Enums.CrudType.Delete); ReturnAlertMessage(status); } return(RedirectToAction("GetCheque")); }
public ActionResult UpdateDocProof(Gbl_Master_DocProof model) { ViewBag.ShopList = WebSession.ShopList; if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetDocProof(model, Enums.CrudType.Update); ReturnAlertMessage(status); } return(RedirectToAction("GetDocProof")); }
public QuickQuote ReMapQuickQuoteData(QuickQuote quickQuote, MasterDetails masterDetails, MotorVehicleDetails motorVehicleDetails) { quickQuote.VehicleDetails.VehicleMakeList = masterDetails?.masterData?.motor?.vehicle?.Make ?? new List <string>(); quickQuote.VehicleDetails.VehicleUsageList = masterDetails?.masterData?.motor?.vehicle?.Usage ?? new List <string>(); quickQuote.VehicleDetails.ColorList = motorVehicleDetails?.Color ?? new List <string>(); quickQuote.VehicleDetails.TransmissionTypeList = motorVehicleDetails?.Transmission ?? new List <string>(); quickQuote.VehicleDetails.VehicleModelList = motorVehicleDetails?.Models ?? new List <string>(); quickQuote.VehicleDetails.VehicleTypeList = motorVehicleDetails?.Class ?? new List <string>(); quickQuote.InsuredDetails.CityList = masterDetails?.masterData?.cities ?? new List <string>(); return(quickQuote); }
public QuoteRepository(MasterDataService masterDataService, MotorVehicleDetailsService motorVehicleDetailsService, QuickQuoteService quickQuoteService) { this._masterDataService = masterDataService; this._motorVehicleDetailsService = motorVehicleDetailsService; this._quickQuoteService = quickQuoteService; this._masterDetails = new MasterDetails(); this._carDetails = new MotorVehicleDetails(); this._quickQuote = new QuickQuote(); this._vehicleInfo = new VehicleInfo(); this._insuredInfo = new InsuredInfo(); }
public ActionResult SetAccountType(AccTypeModel model) { ViewBag.ShopList = WebSession.ShopList; if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetAccType(model, Enums.CrudType.Insert); ReturnAlertMessage(status); } return(RedirectToAction("GetAccountType")); }
public ActionResult UpdateNotification(NotificationDbModel model) { ViewBag.ShopList = WebSession.ShopList; if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetNotification(model, Enums.CrudType.Update); ReturnAlertMessage(status); } return(RedirectToAction("GetNotification")); }
public ActionResult DeleteShop(ShopModel model) { ViewBag.ShopList = WebSession.ShopList; if (ModelState.IsValid) { MasterDetails _details = new MasterDetails(); Enums.CrudStatus status = _details.SetShop(model, Enums.CrudType.Delete); ReturnAlertMessage(status); } return(RedirectToAction("GetShop")); }
private void _RegisterMasterToStorage() { var masterDetails = new MasterDetails() { Address = StaticProperties.NodeConfig.NodeAddress, Id = StaticProperties.NodeConfig.NodeId, Name = StaticProperties.NodeConfig.NodeName, Port = StaticProperties.NodeConfig.NodePort }; log.Debug("Registering master to:" + StaticProperties.NodeConfig.StorageType); _dataManager.InsertMaster(masterDetails); log.Debug("Registraion done"); }
public JsonResult GetNotificationJson(bool fetchAll = true) { try { MasterDetails model = new MasterDetails(); return(Json(model.GetNotificationJson(fetchAll), JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json("Invalid Error")); } }
public JsonResult SendNotification(int notificationId) { try { MasterDetails model = new MasterDetails(); return(Json(ReturnAjaxAlertMessage(model.SendNotification(notificationId, Enums.CrudType.Update)).ToList(), JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json("Invalid Error")); } }
public JsonResult GetShopJson() { try { MasterDetails model = new MasterDetails(); return(Json(model.GetShopJson())); } catch (Exception) { return(Json("Invalid Error")); } }
// GET: Customer public ActionResult MasterDetail() //Action for two tables in one view { CustomerRepo cr = new CustomerRepo(); MasterDetails MultiTable = new MasterDetails(); List <MasterDetails> MasterData = cr.GetMasterDetails().ToList(); MultiTable.CustPersonal = MasterData[0].CustPersonal; MultiTable.CustRegions = MasterData[0].CustRegions; return(View(MultiTable)); }
/// <summary> /// Creates a product string for Scott Belasovitch's extension /// </summary> /// <param name="recordMS"></param> /// <returns>A string in the format: /// sku:qty:price:product_name /// </returns> public static string CreateProductsStringSB(MasterDetails recordMS) { var record = (PaypalRecord)recordMS.Master; StringBuilder products = new StringBuilder(); if (record.PaypalType == "Mobile Payment Received") { var ebayItem = StringFunctions.ParseEbayItem(record.ItemTitle); products.Append(ebayItem.SKU); products.Append(":"); products.Append(record.Quantity); products.Append(":"); products.Append(record.Gross); products.Append(":"); products.Append(record.ItemTitle); } else { int counter = 0; foreach (PaypalRecord item in recordMS.Details) { var ebayItem = StringFunctions.ParseEbayItem(item.ItemTitle); if (ebayItem != null) { products.Append(ebayItem.SKU); products.Append(":"); products.Append(item.Quantity); products.Append(":"); products.Append(item.Gross); products.Append(":"); products.Append(item.ItemTitle); } else { products.Append(item.Gross < 0 ? "Discount" : "SKU"); products.Append(":"); products.Append(item.Quantity); products.Append(":"); products.Append(item.Gross); products.Append(":"); products.Append(item.PaypalType); } if ((recordMS.Details.Length > 1) && (counter < recordMS.Details.Length - 1)) { products.Append("|"); } counter++; } } return(products.ToString()); }
public ActionResult DoctorsPerfDrillDown(int specId, DateTime startDate, DateTime endDate, int[] FacilityId) { MasterDetails model = new MasterDetails(); int[] facilityId = { 1, 2, 3, 4, 5, 6 }; var rIP = RunningRevenueSpecialtyPerAccountCat(startDate, endDate, facilityId).Where(x => x.DepartmentID == specId).ToList(); model.EndTime = DateTime.Now.AddDays(0).ToString(); model.ResultIP = rIP; ViewBag.revSumIPD = Math.Round(rIP.Select(x => x.IPNetAmt).Sum(), 2); ViewBag.revSumOPD = Math.Round(rIP.Select(x => x.OPNetAmt).Sum(), 2); ViewBag.revTotalAmt = Math.Round(rIP.Select(x => x.TotalNetAmt).Sum(), 2); return(View(model)); }
public void CustomerOrdersWrite2() { MasterDetailEngine <CustomersVerticalBar, OrdersVerticalBar> masterDetEng = new MasterDetailEngine <CustomersVerticalBar, OrdersVerticalBar>(); MasterDetails <CustomersVerticalBar, OrdersVerticalBar> record; List <MasterDetails <CustomersVerticalBar, OrdersVerticalBar> > records = new List <MasterDetails <CustomersVerticalBar, OrdersVerticalBar> >(); // Create the master detail item record = new MasterDetails <CustomersVerticalBar, OrdersVerticalBar>(); records.Add(record); // Create the master object record.Master = new CustomersVerticalBar(); record.Master.CustomerID = "ALFKI"; record.Master.Country = "Argentina"; // Create the details object List <OrdersVerticalBar> orders = new List <OrdersVerticalBar>(); foreach (OrdersVerticalBar det in colDetails) { orders.Add(det); } record.Details = orders.ToArray(); // We can create a second master object record = new MasterDetails <CustomersVerticalBar, OrdersVerticalBar>(); records.Add(record); record.Master = new CustomersVerticalBar(); record.Master.CustomerID = "ALFKI"; record.Master.Country = "Argentina"; orders = new List <OrdersVerticalBar>(); foreach (OrdersVerticalBar det in colDetails) { orders.Add(det); } record.Details = orders.ToArray(); // And now write it to a file masterDetEng.WriteFile("myMDfile.txt", records.ToArray()); }
public IEnumerable <MasterDetails> GetMasterDetails() { var get = db.QueryMultiple("GetMasterDetails", commandType: CommandType.StoredProcedure); MasterDetails obj = new MasterDetails(); //Assigning each Multiple tables data to specific single model class obj.CustPersonal = get.Read <Customer>().ToList(); obj.CustRegions = get.Read <Region>().ToList(); List <MasterDetails> masterdetails = new List <MasterDetails>(); masterdetails.Add(obj); return(masterdetails); }
public APIResponse NewsType() { APIResponse objResponse = new APIResponse(); try { MasterDetails obj = new MasterDetails(); objResponse.Collection = obj.GetNewsType(); objResponse.StatusCode = APIStatusCode.Success;; objResponse.StatusMessage = "API sucussfully processed"; } catch (Exception ex) { objResponse.StatusMessage = ex.Message; objResponse.StatusCode = APIStatusCode.Success; } return(objResponse); }
public ActionResult DoctorsPerformance() { var Fromdate = DateTime.Today; var ToDate = DateTime.Today.AddDays(1).AddTicks(-1); MasterDetails model = new MasterDetails(); int[] facilityId = { 1, 2, 3, 4, 5, 6 }; model.Facility = GetAllFacilities(); var rIP = RunningRevenueSpecialtyPerAccountCat(Fromdate, ToDate, facilityId); model.EndTime = DateTime.Now.AddDays(0).ToString(); model.ResultIP = rIP; model.StartTime = DateTime.Now.AddDays(0).ToString(); ViewBag.revSumIPD = Math.Round(rIP.Select(x => x.IPNetAmt).Sum(), 2); ViewBag.revSumOPD = Math.Round(rIP.Select(x => x.OPNetAmt).Sum(), 2); ViewBag.revTotalAmt = Math.Round(rIP.Select(x => x.TotalNetAmt).Sum(), 2); return(View(model)); //MasterMTDDetails CustData = new MasterMTDDetails(); //CustData.Facility = GetAllFacilities(); //var y= SpecialtyVolume().ToList(); //int[] facilityId = { 1, 2, 3, 4, 5, 6 }; //List<SpecialtyVolume> volume = new List<SpecialtyVolume>(); //foreach (var v in y) //{ // SpecialtyVolume sp = new SpecialtyVolume(); // sp.End = DateTime.Today.AddDays(1).AddTicks(-1); // sp.Start = DateTime.Today; // sp.FacilityId = facilityId; // sp.IPVolume = v.IPVolume; // sp.OPVolume = v.OPVolume; // sp.ID = v.ID; // sp.specialty = v.specialty; // volume.Add(sp); //} //CustData.SpecialtyVolume = volume; //CustData.EndTime = DateTime.Now.AddDays(0).ToString(); //return View(CustData); }
public void CustomerOrdersWrite2() { MasterDetailEngine<CustomersVerticalBar, OrdersVerticalBar> masterDetEng = new MasterDetailEngine<CustomersVerticalBar, OrdersVerticalBar>(); MasterDetails<CustomersVerticalBar, OrdersVerticalBar> record; List<MasterDetails<CustomersVerticalBar, OrdersVerticalBar>> records = new List<MasterDetails<CustomersVerticalBar,OrdersVerticalBar>>(); // Create the master detail item record = new MasterDetails<CustomersVerticalBar, OrdersVerticalBar>(); records.Add(record); // Create the master object record.Master = new CustomersVerticalBar(); record.Master.CustomerID = "ALFKI"; record.Master.Country = "Argentina"; // Create the details object List<OrdersVerticalBar> orders = new List<OrdersVerticalBar>(); foreach (OrdersVerticalBar det in colDetails) { orders.Add(det); } record.Details = orders.ToArray(); // We can create a second master object record = new MasterDetails<CustomersVerticalBar, OrdersVerticalBar>(); records.Add(record); record.Master = new CustomersVerticalBar(); record.Master.CustomerID = "ALFKI"; record.Master.Country = "Argentina"; orders = new List<OrdersVerticalBar>(); foreach (OrdersVerticalBar det in colDetails) { orders.Add(det); } record.Details = orders.ToArray(); // And now write it to a file masterDetEng.WriteFile("myMDfile.txt", records.ToArray()); }
private SkeletonFrame ConstructSkeletonFrame(MasterDetails md) { FrameContainer frame = md.Master as FrameContainer; SkeletonContainer skeleton = md.Details.Cast<SkeletonContainer>().FirstOrDefault(); return new SkeletonFrame(ExtractJoints(skeleton), frame.TimeStamp); }