Esempio n. 1
0
        private async void LoadMtoList()
        {
            try 
            {
                mtolist = await(new Lib.ServiceModel.ProjectModel()).GetMaterialTakeOff(Lib.CWPDataSource.selectedCWP, Lib.CommonDataSource.selectedDrawing,
                    Lib.CommonDataSource.selectedMaterialCategory, _projectid, _disciplineCode);

                lvMtoList.ItemsSource = mtolist.mto;
            }
            catch (Exception ex)
            {
 
            }
        }
Esempio n. 2
0
        public async Task<DataLibrary.MTOPageTotal> GetMaterialTakeOff(int cwpId, int drawingId, int materialCategyrId, int projectId, string disciplineCode)
        {
            DataLibrary.MTOPageTotal retValue = new DataLibrary.MTOPageTotal();

            List<dynamic> param = new List<dynamic>();
            param.Add(cwpId);
            param.Add(drawingId);
            param.Add(materialCategyrId);
            param.Add(0);
            param.Add(0);
            param.Add(projectId);
            param.Add(disciplineCode);
            param.Add(1);
            param.Add(10000);
            var result = await JsonHelper.GetDataAsync<DataLibrary.MTOPageTotal>("JsonGetMaterialTakeOff", param, JsonHelper.ProjectService);

            retValue = result;

            return retValue;
        }
Esempio n. 3
0
 private async void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lvMtoList.SelectedItems.Count > 0)
         {
             DataLibrary.MTOPageTotal deletemto = new DataLibrary.MTOPageTotal();
             foreach (DataLibrary.MTODTO mto in mtolist.mto)
             {
                 //todo equals 항목 확인
                 if (mto.ProgressID.Equals(((DataLibrary.MTODTO)lvMtoList.SelectedItem).ProgressID))
                 {
                     mto.DTOStatus = (int)DataLibrary.Utilities.RowStatus.Delete;
                     deletemto.mto = new List<DataLibrary.MTODTO>();
                     deletemto.mto.Add(mto);
                 }
             }
             //todo 확인이 필요해서 주석처리
             // await(new Lib.ServiceModel.ProjectModel().DeleteMto(deletemto.mto, Login.UserAccount.UserName, Login.UserAccount.LoginName, Login.UserAccount.WDPassword, 0));
         }
     }
     catch (Exception ex)
     { 
     }
 }