public CaptureParam GetParamCapture(int userTypeId, int userId) { SoapKitchenDAL sKDal = new SoapKitchenDAL(); CaptureParam capModel = new CaptureParam(); ParamDAL parDal = new ParamDAL(); capModel.Months = parDal.GetMonths(); capModel.Years = parDal.GetYears(); capModel.SoapKitchens = sKDal.GetSoapKitchenByUser(userTypeId, userId); return(capModel); }
public ActionResult Create() { UserDTO userDto = (UserDTO)Session["userData"]; SedesolServiceClient proxy = new SedesolServiceClient(); CaptureParam model = proxy.GetParamCapture(userDto.Id_User_Type, userDto.Id); List <YearDTO> years = model.Years; years = years.Where(item => Convert.ToInt32(item.Description) <= DateTime.Now.Year).ToList(); model.Years = years; return(View(model)); }
public JsonResult FindMonth(int year) { UserDTO userDto = (UserDTO)Session["userData"]; SedesolServiceClient proxy = new SedesolServiceClient(); CaptureParam model = proxy.GetParamCapture(userDto.Id_User_Type, userDto.Id); List <MonthDTO> months = model.Months; if (year == DateTime.Now.Year) { months = months.Where(item => item.Id <= DateTime.Now.Month).ToList(); } return(Json(months)); }
public void Run(int[] src, int[] imagdarksub, out int[] SamplingValue, CaptureParam caps) { var DSP = DSPFactory.Create(param.DemosaicSelect); DSP.param = param; DSP.Width = Width; DSP.Height = Height; DSP.Canvas_Width = Canvas_Width; DSP.Canvas_Height = Canvas_Height; /*SaveProcess*/ //saves.save_pre(src); if (caps.enableresult) { caps.GetResult(); src = Array.ConvertAll(caps.ave, n => (int)n); caps.ave.SaveRawFloat(caps.savepath, $"ave.bin"); caps.dev.SaveRawFloat(caps.savepath, $"dev.bin"); } //DSP.Unfolding(src); DSP.UnfoldingCorrection(src); if (caps.enable1) { src.SaveRaw(caps.savepath, $"{caps.filename}.bin"); } if (caps.enableadd1) { caps.Add(src); } DSP.DarkSub(src, imagdarksub); DSP.HOB(src); if (caps.enable2) { src.SaveRaw(caps.savepath, $"{caps.filename}_HOB.bin"); } DSP.Sort(src); SamplingValue = DSP.Sampling(src); DSP.Offset(src); TrimCanvas(src, param.Canvas_X, param.Canvas_Y); DSP.Demosaic( Canvas_Width, Canvas_Height, img16uc1, img16uc3, img8uc3, GetInputMat((float)param.RGain, (float)param.GGain, (float)param.BGain, param.Matrix), param.bayerpattern ); if (lut != null) { LookUp(); } Convert8UC3(); Blur(); Application.Current.Dispatcher.Invoke(new Action(() => { ConvertBitmap(); }), DispatcherPriority.Background, new object[] { }); if (caps.enableBMP) { img.SaveBMP(caps.savepath, $"{caps.filename}.bmp"); } //後処理 //return (img, new int[] { 1 }); }