Exemple #1
0
 static private void UpDatePropertyDocumentTypeModel(PropertyDocumentTypeModel target, PropertyDocumentType source)
 {
     target.PropertyDocumentTypeId = source.PropertyDocumentTypeId;
     target.PropertyId             = source.PropertyId;
     target.DocumentType           = source.DocumentTypeName;
     target.DocumentTypeId         = source.DocumentTypeId;
     target.LandAreaInputAcres     = Convert.ToInt32(source.LandAreaInputAcres).ToString();
     target.LandAreaInputGuntas    = Convert.ToInt32(source.LandAreaInputGuntas).ToString();
     target.LandAreaInputAanas     = source.LandAreaInputAanas.ToString();
     target.LandAreaInAcres        = source.LandAreaInAcres.ToString();
     target.LandAreaInGuntas       = source.LandAreaInGuntas.ToString();
     target.LandAreaInSqMts        = source.LandAreaInSqMts.ToString();
     target.LandAreaInSqft         = source.LandAreaInSqft.ToString();
     target.AKarabAreaInputAcres   = Convert.ToInt32(source.AKarabAreaInputAcres).ToString();
     target.AKarabAreaInputGuntas  = Convert.ToInt32(source.AKarabAreaInputGuntas).ToString();
     target.AKarabAreaInputAanas   = source.AKarabAreaInputAanas.ToString();
     target.AKarabAreaInAcres      = source.AKarabAreaInAcres.ToString();
     target.AKarabAreaInGuntas     = source.AKarabAreaInGuntas.ToString();
     target.AKarabAreaInSqMts      = source.AKarabAreaInSqMts.ToString();
     target.AKarabAreaInSqft       = source.AKarabAreaInSqft.ToString();
     target.BKarabAreaInputAcres   = Convert.ToInt32(source.BKarabAreaInputAcres).ToString();
     target.BKarabAreaInputGuntas  = Convert.ToInt32(source.BKarabAreaInputGuntas).ToString();
     target.BKarabAreaInputAanas   = source.BKarabAreaInputAanas.ToString();
     target.BKarabAreaInAcres      = source.BKarabAreaInAcres.ToString();
     target.BKarabAreaInGuntas     = source.BKarabAreaInGuntas.ToString();
     target.BKarabAreaInSqMts      = source.BKarabAreaInSqMts.ToString();
     target.BKarabAreaInSqft       = source.BKarabAreaInSqft.ToString();
     target.SaleValue1             = source.SaleValue1;
     target.SaleValue2             = source.SaleValue2;
     target.TotalSale = (source.SaleValue1 + source.SaleValue2).ToString();
     if (source.LandArea != null && source.LandArea != "")
     {
         var area           = source.LandArea.Split('-');
         var calculatedArea = LandBankManagement.AreaConvertor.ConvertArea(Convert.ToDecimal(area[0]), Convert.ToDecimal(area[1]), Convert.ToDecimal(area[2]));
         target.LandArea = calculatedArea.Acres + " - " + calculatedArea.Guntas + " - " + calculatedArea.Anas;
     }
 }
Exemple #2
0
 private void UpdatePropertyDocumentTypeFromModel(PropertyDocumentType target, PropertyDocumentTypeModel source)
 {
     target.PropertyDocumentTypeId = source.PropertyDocumentTypeId;
     target.PropertyId             = source.PropertyId;
     target.DocumentTypeId         = source.DocumentTypeId;
     target.LandAreaInputAcres     = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInputAcres) ? "0" : source.LandAreaInputAcres);
     target.LandAreaInputGuntas    = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInputGuntas) ? "0" : source.LandAreaInputGuntas);
     target.LandAreaInputAanas     = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInputAanas) ? "0" : source.LandAreaInputAanas);
     target.LandAreaInAcres        = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInAcres) ? "0" : source.LandAreaInAcres);
     target.LandAreaInGuntas       = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInGuntas) ? "0" : source.LandAreaInGuntas);
     target.LandAreaInSqMts        = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInSqMts) ? "0" : source.LandAreaInSqMts);
     target.LandAreaInSqft         = Convert.ToDecimal(string.IsNullOrEmpty(source.LandAreaInSqft) ? "0" : source.LandAreaInSqft);
     target.AKarabAreaInputAcres   = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInputAcres) ? "0" : source.AKarabAreaInputAcres);
     target.AKarabAreaInputGuntas  = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInputGuntas) ? "0" : source.AKarabAreaInputGuntas);
     target.AKarabAreaInputAanas   = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInputAanas) ? "0" : source.AKarabAreaInputAanas);
     target.AKarabAreaInAcres      = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInAcres) ? "0" : source.AKarabAreaInAcres);
     target.AKarabAreaInGuntas     = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInGuntas) ? "0" : source.AKarabAreaInGuntas);
     target.AKarabAreaInSqMts      = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInSqMts) ? "0" : source.AKarabAreaInSqMts);
     target.AKarabAreaInSqft       = Convert.ToDecimal(string.IsNullOrEmpty(source.AKarabAreaInSqft) ? "0" : source.AKarabAreaInSqft);
     target.BKarabAreaInputAcres   = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInputAcres) ? "0" : source.BKarabAreaInputAcres);
     target.BKarabAreaInputGuntas  = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInputGuntas) ? "0" : source.BKarabAreaInputGuntas);
     target.BKarabAreaInputAanas   = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInputAanas) ? "0" : source.BKarabAreaInputAanas);
     target.BKarabAreaInAcres      = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInAcres) ? "0" : source.BKarabAreaInAcres);
     target.BKarabAreaInGuntas     = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInGuntas) ? "0" : source.BKarabAreaInGuntas);
     target.BKarabAreaInSqMts      = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInSqMts) ? "0" : source.BKarabAreaInSqMts);
     target.BKarabAreaInSqft       = Convert.ToDecimal(string.IsNullOrEmpty(source.BKarabAreaInSqft) ? "0" : source.BKarabAreaInSqft);
     target.SaleValue1             = source.SaleValue1;
     target.SaleValue2             = source.SaleValue2;
 }
Exemple #3
0
        static public async Task <PropertyModel> CreatePropertyModelWithDocsAsync(Property source)
        {
            var model = new PropertyModel()
            {
                PropertyId       = source.PropertyId,
                PropertyGuid     = source.PropertyGuid,
                PropertyName     = source.PropertyName,
                GroupGuid        = source.GroupGuid,
                PartyId          = source.PartyId,
                TalukId          = source.TalukId.ToString(),
                HobliId          = source.HobliId.ToString(),
                VillageId        = source.VillageId.ToString(),
                DocumentTypeId   = source.DocumentTypeId.ToString(),
                DateOfExecution  = source.DateOfExecution,
                DocumentNo       = source.DocumentNo,
                PropertyTypeId   = source.PropertyTypeId.ToString(),
                SurveyNo         = source.SurveyNo,
                PropertyGMapLink = source.PropertyGMapLink,
                //LandAreaInputAcres = source.LandAreaInputAcres.ToString(),
                //LandAreaInputGuntas = source.LandAreaInputGuntas.ToString(),
                //LandAreaInputAanas = source.LandAreaInputAanas.ToString(),
                //LandAreaInAcres = source.LandAreaInAcres.ToString(),
                //LandAreaInGuntas = source.LandAreaInGuntas.ToString(),
                //LandAreaInSqMts = source.LandAreaInSqMts.ToString(),
                //LandAreaInSqft = source.LandAreaInSqft.ToString(),
                //AKarabAreaInputAcres = source.AKarabAreaInputAcres.ToString(),
                //AKarabAreaInputGuntas = source.AKarabAreaInputGuntas.ToString(),
                //AKarabAreaInputAanas = source.AKarabAreaInputAanas.ToString(),
                //AKarabAreaInAcres = source.AKarabAreaInAcres.ToString(),
                //AKarabAreaInGuntas = source.AKarabAreaInGuntas.ToString(),
                //AKarabAreaInSqMts = source.AKarabAreaInSqMts.ToString(),
                //AKarabAreaInSqft = source.AKarabAreaInSqft.ToString(),
                //BKarabAreaInputAcres = source.BKarabAreaInputAcres.ToString(),
                //BKarabAreaInputGuntas = source.BKarabAreaInputGuntas.ToString(),
                //BKarabAreaInputAanas = source.BKarabAreaInputAanas.ToString(),
                //BKarabAreaInAcres = source.BKarabAreaInAcres.ToString(),
                //BKarabAreaInGuntas = source.BKarabAreaInGuntas.ToString(),
                //BKarabAreaInSqMts = source.BKarabAreaInSqMts.ToString(),
                //BKarabAreaInSqft = source.BKarabAreaInSqft.ToString(),
                //SaleValue1 = source.SaleValue1,
                //SaleValue2 = source.SaleValue2,
                CompanyID = source.CompanyID.ToString(),
                IsSold    = source.IsSold
            };


            if (source.PropertyDocumentType != null && source.PropertyDocumentType.Count > 0)
            {
                ObservableCollection <PropertyDocumentTypeModel> propDocTypeList = new ObservableCollection <PropertyDocumentTypeModel>();
                foreach (var propDoc in source.PropertyDocumentType)
                {
                    var propertyDocumentTypeModel = new PropertyDocumentTypeModel();
                    UpDatePropertyDocumentTypeModel(propertyDocumentTypeModel, propDoc);

                    if (propDoc.PropertyDocuments != null)
                    {
                        ObservableCollection <ImagePickerResult> docs = new ObservableCollection <ImagePickerResult>();
                        foreach (var doc in propDoc.PropertyDocuments)
                        {
                            docs.Add(new ImagePickerResult
                            {
                                blobId         = doc.PropertyBlobId,
                                guid           = doc.PropertyGuid,
                                FileName       = doc.FileName,
                                ImageBytes     = doc.FileBlob,
                                ContentType    = doc.FileType,
                                Size           = doc.FileLenght,
                                FileCategoryId = doc.FileCategoryId,
                                DocumentType   = doc.PropertyDocumentTypeId
                            });
                        }
                        propertyDocumentTypeModel.PropertyDocuments = docs;
                    }
                    propDocTypeList.Add(propertyDocumentTypeModel);
                }
                model.PropertyDocumentType = propDocTypeList;
            }

            return(model);
        }