Beispiel #1
0
        public bool Insert()
        {
            Command = CommandBuilder(@"insert into Production ( productId, qty, actualQty, expireDate, manufuctureDate, number, formulaId, employeeId) 
                                        values( @productId, @qty, @actualQty, @expireDate, @manufuctureDate, @number, @formulaId, @employeeId)");

            Command.Parameters.AddWithValue("@productId", ProductId);
            Command.Parameters.AddWithValue("@qty", Quentity);
            Command.Parameters.AddWithValue("@actualQty", ActualQuentity);
            Command.Parameters.AddWithValue("@expireDate", ExpireDate.ToShortDateString());
            Command.Parameters.AddWithValue("@manufuctureDate", ManufuctureDate.ToShortDateString());
            Command.Parameters.AddWithValue("@number", Number);
            Command.Parameters.AddWithValue("@formulaId", FormulaId);
            Command.Parameters.AddWithValue("@employeeId", EmployeeId);
            return(ExecuteNQ(Command));
        }
Beispiel #2
0
        public override string ToString()
        {
            var completion = GetObjectiveCompletionPercents();

            var subobjecivesString = new StringBuilder();

            foreach (var item in Subobjectives)
            {
                subobjecivesString.Append($"|\n|______Subobjective {Subobjectives.IndexOf(item) + 1}. {item.ToString()}");
            }

            return($"{Title}. Formulation date: {ObjectiveFormulationDate.ToShortDateString()} Expire date: {ExpireDate.ToShortDateString()} - {completion}%\n" +
                   $"{subobjecivesString.ToString()}");
        }