Пример #1
0
        public void Delete(Inspection model)
        {
            #region 取資料
            Model.Inspection query = this.Get(model.ID_Inspection);
            //var queryoverseastaff = this._overseaService.GetForOverType(query.ID_OverType);
            #endregion

            #region 邏輯驗證
            if (query == null)//沒有資料
            {
                throw new Exception("MessageNoData".ToLocalized());
            }

            //驗證
            //if (queryoverseastaff == null)//沒有資料
            //    throw new Exception("MessageDataHasLinking".ToLocalized());
            #endregion

            #region 變為Models需要之型別及邏輯資料

            #endregion

            #region Models資料庫
            //刪圖片
            this._inspectionimageService.DeleteWithOutSaveChange(model.ID_Inspection);

            this._repository.Delete(query);
            this._unitOfWork.SaveChange();
            #endregion
        }
Пример #2
0
        /// <summary>
        /// Updates the cell.
        /// </summary>
        /// <param name="content">Content.</param>
        /// <param name="DashBoardRowSelected">Dash board row selected.</param>
        /// <param name="rowNo">Row no.</param>
        public void UpdateCell(Model.Inspection content, EventHandler DashBoardRowSelected, nint rowNo)
        {
            try
            {
                if (null == this.dashBoardRowSelected)
                {
                    dashBoardRowSelected = DashBoardRowSelected;
                }
                lblOwnerNamer.Text = content.HouseOwnerName;

                lblAddress1.Text         = content.InspectionAddress1;
                lblConstructionType.Text = content.Pathway.ToString();
                lblInspectionDate.Text   = content.inspectionDateTime.ToString();

                lblAddress2.Text = content.City + " " + content.Pincode;

                //lblCityStateZip.Hidden = true;
                // use for debugging
                lblInspectionType.Text = content.InspectionType;


                lblContactNo.Text    = content.PhoneNo;
                this.BackgroundColor = UIColor.Clear;
                btnBeginInspection.BackgroundColor = UIColor.White;
                btnBeginInspection.SetTitleColor(UIColor.FromRGB(0, 153, 204), UIControlState.Normal);
                btnBeginInspection.Layer.BorderWidth     = 1;
                btnBeginInspection.Layer.BorderColor     = UIColor.FromRGB(0, 105, 170).CGColor;
                btnBeginInspection.Layer.ShadowColor     = UIColor.DarkGray.CGColor;
                btnBeginInspection.Layer.ShadowOpacity   = 1.0f;
                btnBeginInspection.Layer.ShadowRadius    = 6.0f;
                btnBeginInspection.Layer.ShadowOffset    = new System.Drawing.SizeF(0f, 3f);
                btnBeginInspection.Layer.ShouldRasterize = true;
                btnBeginInspection.Layer.MasksToBounds   = false;
                btnBeginInspection.Enabled             = true;
                this.dashBoardInspectionContent        = content;
                this.btnBeginInspection.TouchUpInside -= BtnBeginInspection_TouchUpInside;
                this.btnBeginInspection.TouchUpInside += BtnBeginInspection_TouchUpInside;
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Exception Occured in UpadetCell method due to " + ex.Message);
            }
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LiRoInspect.iOS.DB_DetailTableSource"/> class.
 /// </summary>
 /// <param name="inspectioDet">Inspectio det.</param>
 public DB_DetailTableSource(Model.Inspection inspectioDet)
 {
     DescTableItems = inspectioDet.GetProjectDetail();
 }