Exemplo n.º 1
0
        public override string ToString()
        {
            var result = string.Empty;

            result += DateCreate.ToString("dd.MM.yyyy");
            var name = string.Empty;

            if (!string.IsNullOrEmpty(NameRu))
            {
                name = NameRu;
            }
            else if (!string.IsNullOrEmpty(NameKz))
            {
                name = NameKz;
            }
            else if (!string.IsNullOrEmpty(NameEn))
            {
                name = NameEn;
            }
            if (!string.IsNullOrEmpty(ContractNum))
            {
                result = (string.IsNullOrEmpty(result) ? string.Empty : result + " - ") + ContractNum;
            }
            if (!string.IsNullOrEmpty(name))
            {
                result = (string.IsNullOrEmpty(result) ? string.Empty : result + " - ") + name;
            }
            if (string.IsNullOrEmpty(result))
            {
                return(Id + string.Empty);
            }
            return(result);
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            var result = DateCreate.ToString("dd.MM.yyyy");
            var name   = Empty;

            if (!IsNullOrEmpty(NameRu))
            {
                name = NameRu;
            }
            else if (!IsNullOrEmpty(NameKz))
            {
                name = NameKz;
            }
            else if (!IsNullOrEmpty(NameEn))
            {
                name = NameEn;
            }
            if (!IsNullOrEmpty(GosNumber))
            {
                result = (IsNullOrEmpty(result) ? Empty : result + " - ") + GosNumber;
            }
            if (!IsNullOrEmpty(name))
            {
                result = (IsNullOrEmpty(result) ? Empty : result + " - ") + name;
            }
            if (IsNullOrEmpty(result))
            {
                return(Id + Empty);
            }
            return(result);
        }
Exemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            BindingSource bs = new BindingSource();

            bs.DataSource           = DateCreate.Begin();
            DateComboBox.DataSource = bs.DataSource;

            dataGridView1.DataSource = GetData();
        }
Exemplo n.º 4
0
        public override string ToString()
        {
            if (Information == null)
            {
                return("null");
            }

            return(DateCreate.ToString() + ":" + (IsFavorite ? " [F]" : "") + " <" + TypeTracert.ToString() + "> " + Information.Trim() + (IsOff ? " [off]" : "") + (IsDelete ? " [delete]" : ""));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Get a single code form index of range number
        /// </summary>
        /// <param name="rangenumber"></param>
        /// <returns></returns>
        private string GetSingleCode(string IndexInRangeNumber)
        {
            string code = "";

            code += DateCreate.ToString("yyMMdd");
            code += ProType;
            code += LineNumber;
            code += CreateNo;
            code += IndexInRangeNumber;
            return(code);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Get a single code form index of range number
        /// </summary>
        /// <param name="rangenumber"></param>
        /// <returns></returns>
        public string GetSingleCode(string IndexInRangeNumber)
        {
            string code = "";

            code += DateCreate.ToString("yyMMdd");
            code += ProType;
            code += LineNumber;
            code += CreateNo;
            string buff = "0";

            for (int j = 0; j <= (7 - IndexInRangeNumber.ToString().Length); j++) //Cần cải thiện vòng lập này.
            {
                buff += "0";
            }
            code += buff;
            code += IndexInRangeNumber;

            return(code);
        }
Exemplo n.º 7
0
        public override string ToString()
        {
            var result = string.Empty;

            if (DateCreate != null)
            {
                result += DateCreate.ToString("dd.MM.yyyy");
            }
            var name = string.Empty;

            if (!string.IsNullOrEmpty(NameRu))
            {
                name = NameRu;
            }
            else if (!string.IsNullOrEmpty(NameKz))
            {
                name = NameKz;
            }
            else if (!string.IsNullOrEmpty(NameEn))
            {
                name = NameEn;
            }
            if (!string.IsNullOrEmpty(RegNumber))
            {
                result = (string.IsNullOrEmpty(result) ? string.Empty : result + " - ") + RegNumber;
            }
            if (!string.IsNullOrEmpty(name))
            {
                result = (string.IsNullOrEmpty(result) ? string.Empty : result + " - ") + name;
            }
            if (string.IsNullOrEmpty(result))
            {
                return(IntellectualPropertyId + string.Empty);
            }
            return(result);
        }
Exemplo n.º 8
0
 public override string ToString()
 {
     return(String.Format("{0} ({1})", Title, DateCreate.ToShortDateString()));
 }
Exemplo n.º 9
0
 public override string ToString()
 {
     return($"Номер: {Number} | Дата создания: {DateCreate.ToString("d")} | Товары: {string.Join(", ", Goods)}");
 }