public string SIVLastest(string type)
        {
            var code     = _customRepository.SIVLastest(type);
            var yearTemp = DateTime.Today.Year.ToString(CultureInfo.InvariantCulture);
            var codeTemp = type + yearTemp;

            if (code == null)
            {
                codeTemp += "000001";
            }
            else
            {
                var intMaxOrderNo = Convert.ToInt32(code.NumSIV);
                intMaxOrderNo++;
                var intOrderNoLength = intMaxOrderNo.ToString(CultureInfo.InvariantCulture).Length;
                var orderNo          = string.Empty;
                for (var i = intOrderNoLength; i < 6; i++)
                {
                    orderNo += "0";
                }

                orderNo += intMaxOrderNo.ToString(CultureInfo.InvariantCulture);

                codeTemp += orderNo;
            }

            return(codeTemp);
        }