Exemplo n.º 1
0
        public MessageRespone CheckSubjectVersion(string centerid, string subjectcode, string version)
        {
            //If current sheets not match by request version then clear all local sheets
            var difSheets = shareRepo.GetDifferentAvailableSheet(centerid, subjectcode, version);

            int extraSheetCount = difSheets.Count();

            if (difSheets.Count > 0)
            {
                //then delete diff version sheet
                shareRepo.CloseDifSheets(difSheets);

                //and return deleted sheets for download new ver for replace
                return(new MessageRespone {
                    Message = "Founded different sheets : " + extraSheetCount, Code = extraSheetCount.ToString()
                });
            }
            else
            {
                return(new MessageRespone {
                    Message = "no extra" + extraSheetCount, Code = 0.ToString()
                });
            }
        }