Ejemplo n.º 1
0
        protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {
                using (SPSite sitecollection = new SPSite(Url))
                {
                    using (SPWeb web = sitecollection.OpenWeb())
                    {
                        SPList list         = web.Lists["Aufgaben"];
                        SPListItem listitem = list.Items.GetItemById(TaskID);
                        if (listitem != null)
                        {
                            if (Status.ToString() != string.Empty)
                            {
                                listitem["Status"] = Status.ToString();
                            }
                            if (Quelle.ToString() != string.Empty)
                            {
                                listitem["Aufgabenquelle"] = Quelle.ToString();
                            }
                            if (DueDate.ToString() != string.Empty)
                            {
                                listitem["DueDate"] = DueDate;
                            }
                            listitem["WorkflowID"] = WorkflowID;

                            listitem.Update();
                        }
                    }
                }
            });
            return(base.Execute(executionContext));
        }
        public override string ToString()
        {
            // TODO ArBy global culture, datetime format
            var formattedIssueDate      = IssueDate.ToString("yyyy-MM-dd");
            var formattedDueDate        = DueDate.ToString("yyyy-MM-dd");
            var formattedRedemptionDate = RedemptionDate != null?RedemptionDate.Value.ToString("yyyy-MM-dd") : "n/a";

            return("Invoice(" +
                   $"serial={Serial}, " +
                   $"id={Id}, " +
                   $"isPayed={IsPayed.ToString()}, " +
                   $"issueDate={formattedIssueDate}, " +
                   $"dueDate={formattedDueDate}, " +
                   $"redemptionDate={formattedRedemptionDate}, " +
                   $"supplier={Supplier}, " +
                   $"receiver={Receiver}, " +
                   $"total={Total.ToString(CultureInfo.InvariantCulture)}, " +
                   $"subtotal={Subtotal.ToString(CultureInfo.InvariantCulture)}, " +
                   $"discount={Discount.ToString(CultureInfo.InvariantCulture)}, " +
                   $"payed={Payed.ToString(CultureInfo.InvariantCulture)}, " +
                   $"due={Due.ToString(CultureInfo.InvariantCulture)}, " +
                   $"items=[{string.Join(", ", Items)}], " +
                   $"payments=[{string.Join(", ", Payments)}]" +
                   ")");
        }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return(" "
            + DueDate.ToString("dd/MM/yyyy")
            + " - "
            + Amount.ToString("F2", CultureInfo.InvariantCulture));
 }
Ejemplo n.º 4
0
        public string ReminderMail()
        {
            var date     = string.Format("Due Date : {0}", DueDate.ToString("ddd, dd MMM yyyy"));
            var composer = new HtmlComposer();

            composer.AppendDiv("This is gentle reminder for the task assigned to you.")
            .AppendHead("Task : " + Title)
            .AppendDiv(date)
            .AppendDiv("Click the below link for more details")
            .AppendLink(Routes.ActivityUrl(ActivityId), Routes.ActivityUrl(ActivityId));
            return(composer.Text.ToString());
        }
Ejemplo n.º 5
0
 public void WriteXml(XmlWriter writer)
 {
     writer.WriteStartElement("TaskItem");
     writer.WriteAttributeString("ID", ID.ToString());
     writer.WriteAttributeString("Brief", Brief);
     writer.WriteAttributeString("Summary", Summary);
     writer.WriteAttributeString("Assignee", Assignee);
     writer.WriteAttributeString("Reviewer", Reviewer);
     writer.WriteAttributeString("DueDate", DueDate.ToString(CultureInfo.InvariantCulture)); //TODO serialize correctly to enable deserialize
     writer.WriteAttributeString("TaskType", TaskType.ToString());
     writer.WriteFullEndElement();
 }
 public void FileInputName(string fileName)
 {
     using (XmlWriter writer = XmlWriter.Create(fileName))
     {
         writer.WriteStartElement("To-Do-Note");
         writer.WriteElementString("SubjectMatter", SubjectMatter);
         writer.WriteElementString("Due-date", DueDate.ToString());
         writer.WriteElementString("Priority", Priority);
         writer.WriteEndElement();
         writer.Flush();
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Formats the assignment into a readable string
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(AssignmentName);
            sb.Append(" (");
            sb.Append(DueDate.ToString("MMM"));
            sb.Append(" ");
            sb.Append(DueDate.Day.ToString());
            //TODO: append the time the assignment is due
            sb.Append(")");
            return(sb.ToString());
        }
Ejemplo n.º 8
0
        private void ClasssAssignFeeButtonClick(object sender, RoutedEventArgs e)
        {
            try
            {
                string grade = ((ComboBoxItem)Grade.SelectedItem).Tag.ToString();

                DateTime DueDate;
                if (DueDateText.Text.Contains("/"))
                {
                    DueDate = DateTime.ParseExact(ClassDueDate.Text.ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture);
                }
                else
                {
                    DueDate = DateTime.ParseExact(ClassDueDate.Text.ToString(), "dd-MM-yyyy", CultureInfo.InvariantCulture);
                }
                DateTime AppliedDate = DateTime.Now.Date;

                var selectedItem = new List <SearchStudentInfoByGradeResult>();

                //Console.WriteLine(ClassSelectedID.ToString(), "feeID");
                //Console.WriteLine(ClassGetFeeAmount().ToString(), "ClassGetFeeAmount");
                //Console.WriteLine(ClassgetFineAmount().ToString(), "ClassgetFineAmount");
                //Console.WriteLine(DueDate.ToString(), "DueDate");
                //Console.WriteLine(DueDate.ToString(), "DueDate");
                //Console.WriteLine(AppliedDate.ToString(), "appliedON");
                //Console.WriteLine(ClassGetDate().ToString(), "feeMonth");

                foreach (SearchStudentInfoByGradeResult item in StudentSearchGrid.ItemsSource)
                {
                    //if (((CheckBox)SelectedStudent.GetCellContent(item)).IsChecked == true)
                    if (((CheckBox)SelectedStudent.GetCellContent(item)).IsChecked == true)
                    {
                        Console.WriteLine(ClassSelectedID.ToString() + " feeID");
                        Console.WriteLine(ClassGetFeeAmount().ToString() + " ClassGetFeeAmount");
                        Console.WriteLine(ClassgetFineAmount().ToString() + " ClassgetFineAmount");
                        Console.WriteLine(DueDate.ToString() + " DueDate");
                        Console.WriteLine(item.AdmissionNumber.ToString() + " item.AdmissionNumber");
                        Console.WriteLine(AppliedDate.ToString() + " appliedON");
                        Console.WriteLine(ClassGetDate().ToString() + " feeMonth");
                    }
                }

                this.ShowMessageAsync("Done", "Process completed");
            }
            catch (System.InvalidCastException err)
            {
                this.ShowMessageAsync("Selection Error!", "You didn't select any item or the search result doesn't belong to your query / Withdraw is only on ID");
                Debug.WriteLine(err.ToString());
            }
        }
Ejemplo n.º 9
0
        public override string ToString()
        {
            string output = "\r\n";

            foreach (var i in InvoiceItems)
            {
                output += $"  { i.ItemName } ({ i.Description }) - R{ i.Total.ToString("#,#", CultureInfo.InvariantCulture) }\r\n";
            }
            return($"Invoice Number: { InvoiceNumber }\r\n" +
                   $"Invoice Date: { InvoiceDate.ToString("d") }\r\n" +
                   $"Due Date: { DueDate.ToString("d") }\r\n" +
                   $"Invoice Items: { output }\r\n" +
                   $"Invoice Total: R{ InvoiceTotal.ToString("#,#", CultureInfo.InvariantCulture) }\r\n");
        }
Ejemplo n.º 10
0
        public void PrintTask()
        {
            string completeYN = "";

            if (Complete == true)
            {
                completeYN = "Yes";
            }
            else
            {
                completeYN = "No";
            }
            Console.WriteLine($"\t{AssignedName}\t{DueDate.ToString("d")}\t{completeYN}\t\t{Description}");
        }
Ejemplo n.º 11
0
        private void button1_Click(object sender, EventArgs e)
        {
            Assignment Assignment = new Assignment();

            Assignment.Subject     = textBoxSubject.Text;
            Assignment.Name        = textBoxName.Text;
            Assignment.Description = textBoxDescription.Text;
            int duration;


            // assingmnet date

            DateTime DueDate;

            DueDate         = dateTimePicker1.Value;
            Assignment.Date = DueDate.ToString();
            // assingmnet start time

            DateTime StartTime;

            StartTime            = dateTimePicker2.Value;
            Assignment.StartTime = StartTime.ToString();
            // assingmnet end time

            DateTime EndTime;

            EndTime            = dateTimePicker3.Value;
            Assignment.EndTime = EndTime.ToString();



            if (int.TryParse(textBoxDuration.Text, out duration))
            {
                Assignment.Duration = int.Parse(textBoxDuration.Text);
                Form1.assignments.Add(Assignment);
                Form1.form1.UpdateNames(Form1.assignments);
                Assignment.Index = Form1.assignments.Count;
                foreach (Assignment assignment in Form1.assignments)
                {
                    assignment.Index = Form1.assignments.IndexOf(assignment);
                }
                MessageBox.Show("Assignment Added!");
                this.Close();
            }
            else
            {
                MessageBox.Show("Please use an integer in Duration");
            }
        }
Ejemplo n.º 12
0
        public string ToJson()
        {
            string checkstr = (IsChecked) ? "true" : "false";

            string result = "{\n";

            result += "\"Message\": \"" + Message + "\",\n";
            result += "\"IsChecked\": " + checkstr + ",\n";
            result += "\"DateCreated\": \"" + DateCreated.ToString() + "\",\n";
            result += "\"DueDate\": \"" + DueDate.ToString() + "\",\n";
            result += "\"Priority\": " + Priority.ToString() + "\n";
            result += "}";

            return(result);
        }
        public new void AsCsvRow(CsvWriter writer, bool bulk = true)
        {
            base.AsCsvRow(writer, bulk);

            writer.WriteField(Title);
            writer.WriteField(Description);
            writer.WriteField(AssignDate.ToString("yyyy-MM-dd"));
            writer.WriteField(DueDate.ToString("yyyy-MM-dd"));
            writer.WriteField(IMSClassId);
            writer.WriteField(LineItemCategoryId);
            writer.WriteField(AcademicSessionId);
            writer.WriteField(ResultValueMin);
            writer.WriteField(ResultValueMax);

            writer.NextRecord();
        }
Ejemplo n.º 14
0
        public override void Add()
        {
            SqlAdd = new SQLiteCommand(
                $@"insert into tblTodoItems(todoId, todo, description, itemPriority, categoryId, startDate, dueDate)
                values(@id, @taskName, @taskDescription, @priority, @category, @startDate, @dueDate)");

            SqlAdd.Parameters.Add(new SQLiteParameter("@id", Id));
            SqlAdd.Parameters.Add(new SQLiteParameter("@taskName", Name));
            SqlAdd.Parameters.Add(new SQLiteParameter("@taskDescription", Description));
            SqlAdd.Parameters.Add(new SQLiteParameter("@priority", Priority));
            SqlAdd.Parameters.Add(new SQLiteParameter("@category", Category));
            SqlAdd.Parameters.Add(new SQLiteParameter("@startDate", StartDate.ToString("yyyy-MM-ddTHH:mm:ss")));
            SqlAdd.Parameters.Add(new SQLiteParameter("@dueDate", DueDate.ToString("yyyy-MM-ddTHH:mm:ss")));

            base.Add();
        }
Ejemplo n.º 15
0
        public Dictionary <string, object> ToDictionary()
        {
            Dictionary <string, object> orderDictionary = new Dictionary <string, object>();

            string[] printOperatorID       = GetIdFromNameIfPresent(PrintOperator, _NameLookup)?.ToArray();
            string[] DestinationLocationID = GetIdFromNameIfPresent(DestinationLocation, _NameLookup)?.ToArray();

            string[] shipperID = GetIdFromNameIfPresent(Shipper, _NameLookup)?.ToArray();

            if (!string.IsNullOrEmpty(IncludedComponentId))
            {
                orderDictionary.AddIfNotNull(IncludedComponentsKey, new string[] { IncludedComponentId });
            }

            orderDictionary.AddIfNotNull(OrderIDKey, OrderID);
            orderDictionary.AddIfNotNull(StageKey, Stage);
            orderDictionary.AddIfNotNull(OrderValueKey, OrderValue);
            orderDictionary.AddIfNotNull(DescriptionKey, Description);
            orderDictionary.AddIfNotNull(NotesKey, Notes);
            orderDictionary.AddIfNotNull(OrderNoteKey, OrderNote);
            orderDictionary.AddIfNotNull(PersonalizationKey, Personalization);

            if (DueDate.Year > 2010)
            {
                orderDictionary.AddIfNotNull(DueDateKey, DueDate.ToString("d"));
            }
            if (ShipDate.Year > 2010)
            {
                orderDictionary.AddIfNotNull(ShippedDateKey, ShipDate.ToString("d"));
            }
            orderDictionary.AddIfNotNull(RushKey, Priority);
            orderDictionary.AddIfNotNull(CancelledKey, Cancelled);
            orderDictionary.AddIfNotNull(InventoryRequestKey, IsInventoryRequest);
            orderDictionary.AddIfNotNull(OrderTypeKey, OrderType);
            orderDictionary.AddIfNotNull(PrintOperatorKey, printOperatorID);
            orderDictionary.AddIfNotNull(DestinationLocationKey, DestinationLocationID);
            orderDictionary.AddIfNotNull(ShipperKey, shipperID);
            orderDictionary.AddIfNotNull(ChannelKey, Channel);
            orderDictionary.AddIfNotNull(OrderURLKey, OrderURL);
            orderDictionary.AddIfNotNull(DesignerURLKey, DesignerURL);
            if (RequestedQuantity > 0)
            {
                orderDictionary.AddIfNotNull(RequestedQuantityKey, RequestedQuantity);
            }

            return(orderDictionary);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Updates the DB with the information in the Concrete Chore targeted by the method
        /// </summary>
        public void Update()
        {
            //Creates queries that updates the concrete_chore and chore entries with this chore's ID
            string query = string.Format("UPDATE concrete_chore SET " +
                                         "due_date='{0}', status={1}, approval_date='{2}', reminder={3} WHERE chore_id={4}",
                                         DueDate.ToString(Properties.Settings.Default.LongDateFormat),
                                         Status, FinalDate.ToString(Properties.Settings.Default.LongDateFormat), Reminder, ID);
            string query2 = string.Format("UPDATE chore SET " +
                                          "child_id={0}, name='{1}', description='{2}', points={3} WHERE chore_id={4}",
                                          Assignment, Name, Description, Points, ID);

            //Executes the queries
            SqlCommand command = new SqlCommand(query, Functions.DatabaseFunctions.DatabaseConnection);

            Functions.DatabaseFunctions.DatabaseConnection.Open();
            command.ExecuteNonQuery();
            command = new SqlCommand(query2, Functions.DatabaseFunctions.DatabaseConnection);
            command.ExecuteNonQuery();
            Functions.DatabaseFunctions.DatabaseConnection.Close();
        }
Ejemplo n.º 17
0
        private void OnAddSaveTaskClick(object obj)
        {
            //to change
            ToDoTask toDoTask = new ToDoTask(false, DueDate.ToString("yyyy-MM-dd"), Title, Completion, Description);

            if (Completion == 100)
            {
                toDoTask.Checked = true;
            }
            if (edited)
            {
                _eventAggregator.GetEvent <SendEditedTaskToListEvent>().Publish(toDoTask);
                clearFields();
            }
            else
            {
                _eventAggregator.GetEvent <SendTaskToListEvent>().Publish(toDoTask);
                clearFields();
            }
        }
Ejemplo n.º 18
0
 private bool CanAddSaveClick(object obj)
 {
     if (edited)
     {
         if (receivedTask.Title != Title || receivedTask.DueDate != DueDate.ToString("yyyy-MM-dd") ||
             receivedTask.Completion != Completion || receivedTask.Description != Description)
         {
             return(true);
         }
     }
     else
     {
         //adding task
         if (Title.Length > 0 && Description.Length > 0)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 19
0
        internal QueryParameters ToApiParameters(bool toCreate)
        {
            var parameters = new QueryParameters();

            parameters.Add("summary", Summary, toCreate);
            parameters.Add("issueTypeId", Type.Id, toCreate);
            parameters.Add("priorityId", Priority.Id, toCreate);

            parameters.Add("description", Description ?? "");
            parameters.Add("dueDate", DueDate?.ToString("yyyy-MM-dd") ?? "");
            parameters.Add("startDate", StartDate?.ToString("yyyy-MM-dd") ?? "");
            parameters.AddRange("categoryId[]", Categories.Select(x => x.Id));
            parameters.AddRange("versionId[]", Versions.Select(x => x.Id));
            parameters.AddRange("milestoneId[]", Milestones.Select(x => x.Id));
            parameters.AddRange("attachmentId[]", Attachments.Select(x => x.Id));
            parameters.Add("parentIssueId", ParentTicketId?.ToString() ?? "");
            parameters.Add("estimatedHours", EstimatedHours?.ToString() ?? "");
            parameters.Add("actualHours", ActualHours?.ToString() ?? "");
            parameters.Add("assigneeId", Assignee?.Id.ToString() ?? "");

            if (!toCreate)
            {
                parameters.Add("statusId", Status?.Id.ToString() ?? "");
                parameters.Add("resolutionId", Resolution?.Id.ToString() ?? "");
            }

            if (CustomFields != null)
            {
                foreach (var field in CustomFields)
                {
                    parameters.Add($"customField_{field.Id}", field.ToJsonValue());
                    if (field.OtherValue != null)
                    {
                        parameters.Add($"customField_{field.Id}_otherValue", field.OtherValue);
                    }
                }
            }

            return(parameters);
        }
Ejemplo n.º 20
0
        public Dictionary <string, object> ToDictionary()
        {
            Dictionary <string, object> orderDictionary = new Dictionary <string, object>();

            string[] printOperatorID = GetIdFromNameIfPresent(PrintOperator, _NameLookup)?.ToArray();
            string[] shipperID       = GetIdFromNameIfPresent(Shipper, _NameLookup)?.ToArray();
            string[] channelID       = GetIdFromNameIfPresent(Channel, _ChannelLookup)?.ToArray();


            orderDictionary.AddIfNotNull(OrderIDKey, OrderID.ToString());
            orderDictionary.AddIfNotNull(DescriptionKey, Description);
            orderDictionary.AddIfNotNull(NotesKey, Notes);
            orderDictionary.AddIfNotNull(OrderNoteKey, OrderNote);
            orderDictionary.AddIfNotNull(CustomerKey, CustomerEmail);
            orderDictionary.AddIfNotNull(TotalPaymentKey, TotalPrice);
            orderDictionary.AddIfNotNull(ActualShippingKey, ShippingCost);
            orderDictionary.AddIfNotNull(SalesTaxKey, SalesTax);
            orderDictionary.AddIfNotNull(ShippingChargeKey, ShippingCharge);
            orderDictionary.AddIfNotNull(MaterialCostKey, MaterialCost);
            if (DueDate.Year > 2010)
            {
                orderDictionary.AddIfNotNull(DueDateKey, DueDate.ToString("d"));
            }
            if (ShipDate.Year > 2010)
            {
                orderDictionary.AddIfNotNull(ShippedDateKey, ShipDate.ToString("d"));
            }
            orderDictionary.AddIfNotNull(RushKey, Rush);
            orderDictionary.AddIfNotNull(PrintOperatorKey, printOperatorID);
            orderDictionary.AddIfNotNull(ShipperKey, shipperID);
            orderDictionary.AddIfNotNull(ShipperPayKey, ShipperPay);
            orderDictionary.AddIfNotNull(ChannelKey, channelID);
            orderDictionary.AddIfNotNull(AsanaTaskIDKey, AsanaTaskID);
            orderDictionary.AddIfNotNull(OptinSentTypeKey, OptinSentType);
            orderDictionary.AddIfNotNull(ValueOfInventoryKey, ValueOfInventory);
            orderDictionary.AddIfNotNull(AmountRefundedKey, AmountRefunded);

            return(orderDictionary);
        }
        public new void AsJson(JsonWriter writer, string baseUrl)
        {
            writer.WriteStartObject();
            base.AsJson(writer, baseUrl);

            writer.WritePropertyName("title");
            writer.WriteValue(Title);

            if (!String.IsNullOrEmpty(Description))
            {
                writer.WritePropertyName("description");
                writer.WriteValue(Description);
            }

            writer.WritePropertyName("assignDate");
            writer.WriteValue(AssignDate.ToString("yyyy-MM-dd"));

            writer.WritePropertyName("dueDate");
            writer.WriteValue(DueDate.ToString("yyyy-MM-dd"));

            writer.WritePropertyName("category");
            LineItemCategory.AsJsonReference(writer, baseUrl);

            writer.WritePropertyName("class");
            IMSClass.AsJsonReference(writer, baseUrl);

            writer.WritePropertyName("gradingPeriod");
            AcademicSession.AsJsonReference(writer, baseUrl);

            writer.WritePropertyName("resultValueMin");
            writer.WriteValue(ResultValueMin.ToString());

            writer.WritePropertyName("resultValueMax");
            writer.WriteValue(ResultValueMax.ToString());

            writer.WriteEndObject();
            writer.Flush();
        }
Ejemplo n.º 22
0
 public override string ToString()
 {
     return($"Date: {DueDate.ToString("dd/MM/yyyy")} - Value: {Amount}");
 }
Ejemplo n.º 23
0
 public override string ToString()
 {
     return(DueDate.ToString("dd/MM/yyyy") + " - " + InstallmentValue.ToString("F2"));
 }
Ejemplo n.º 24
0
        public string toXmlMod()
        {
            string xml = string.Empty;

            xml += "<?xml version=\"1.0\" ?>";
            xml += "<?qbxml version=\"13.0\" ?>";
            xml += "<QBXML>";



            xml += Environment.NewLine + "<QBXMLMsgsRq onError=\"stopOnError\">";
            xml += Environment.NewLine + "<BillModRq requestID=\"10002\">";
            xml += Environment.NewLine + "<BillMod>";

            xml += Environment.NewLine + "<TxnID>" + TxnID + "</TxnID>";
            xml += Environment.NewLine + "<EditSequence>" + EditSequence + "</EditSequence>";

            if (VendorRef != null)
            {
                xml += VendorRef.toXMLVendorRef();
            }

            if (APAccountRef != null)
            {
                xml += APAccountRef.toXmlRef();
            }

            if (txnDate != null)
            {
                string   DateString = txnDate.ToString();
                DateTime dt         = Convert.ToDateTime(DateString);
                xml += Environment.NewLine + "<TxnDate>" + dt.ToString("yyyy-MM-dd") + "</TxnDate>";
            }


            if (DueDate != null)
            {
                string   DateString = DueDate.ToString();
                DateTime dt         = Convert.ToDateTime(DateString);
                xml += Environment.NewLine + "<DueDate>" + dt.ToString("yyyy-MM-dd") + "</DueDate>";
            }


            xml += Environment.NewLine + "<RefNumber>" + RefNumber + "</RefNumber>";
            if (Memo != string.Empty)
            {
                xml += Environment.NewLine + "<Memo>" + Memo + "</Memo>";
            }

            if (ExchangeRate != null)
            {
                System.Globalization.CultureInfo myInfo = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB");
                string val   = ExchangeRate.ToString();
                Double value = Double.Parse(val, myInfo);
                xml += Environment.NewLine + "<ExchangeRate>" + value + "</ExchangeRate>";
            }


            foreach (BillExpenseLine line in expenseLines)
            {
                xml += Environment.NewLine + line.toXmlMod();
            }

            foreach (BillItemLine line in itemLines)
            {
                xml += Environment.NewLine + line.toXmlMod();
            }

            xml += Environment.NewLine + "</BillMod>";
            xml += Environment.NewLine + "</BillModRq>";
            xml += Environment.NewLine + "</QBXMLMsgsRq>";
            xml += Environment.NewLine + "</QBXML>";


            return(xml);
        }
Ejemplo n.º 25
0
        public string toXml()
        {
            StringBuilder toXML = new StringBuilder();

            toXML.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
            toXML.Append("<?qbxml version=\"13.0\" ?>");
            toXML.Append("<QBXML>");
            toXML.Append("<QBXMLMsgsRq onError=\"stopOnError\">");
            toXML.Append("<BillAddRq>");
            toXML.Append("<BillAdd>");

            if (VendorRef != null)
            {
                toXML.Append(VendorRef.toXMLVendorRef());
            }


            if (VendorAddress != null)
            {
                toXML.Append(VendorAddress.toXmlRef());
            }

            if (APAccountRef != null)
            {
                toXML.Append(APAccountRef.toXmlRefBill());
            }
            if (txnDate != null)
            {
                string   DateString = txnDate.ToString();
                DateTime dt         = Convert.ToDateTime(DateString);
                toXML.Append("<TxnDate>" + dt.ToString("yyyy-MM-dd") + "</TxnDate>");
            }


            if (DueDate != null)
            {
                string   DateString = DueDate.ToString();
                DateTime dt         = Convert.ToDateTime(DateString);
                toXML.Append("<DueDate>" + dt.ToString("yyyy-MM-dd") + "</DueDate>");
            }



            toXML.Append("<RefNumber>" + RefNumber + "</RefNumber>");


            if (TermsRef != null)
            {
                toXML.Append(TermsRef.toXmlRef());
            }
            if (Memo != string.Empty)
            {
                toXML.Append("<Memo>" + Memo + "</Memo>");
            }

            //if (IsTaxIncluded != null)
            //{
            //    xml += " <IsTaxIncluded >" + IsTaxIncluded.ToString() + "</IsTaxIncluded>";
            //}

            //if (SalesTaxCodeRef != null)
            //{
            //    xml += SalesTaxCodeRef.toXmlRef();
            //}



            if (ExchangeRate != null)
            {
                System.Globalization.CultureInfo myInfo = System.Globalization.CultureInfo.CreateSpecificCulture("en-GB");
                string val   = ExchangeRate.ToString();
                double value = Double.Parse(val, myInfo);
                toXML.Append("<ExchangeRate>" + value.ToString("0.00", myInfo) + "</ExchangeRate>");
            }
            if (ExternalGUID != string.Empty)
            {
                toXML.Append(" <ExternalGUID >" + ExternalGUID + "</ExternalGUID>");
            }
            foreach (BillExpenseLine line in expenseLines)
            {
                toXML.Append(line.toXml());
            }

            foreach (BillItemLine line in itemLines)
            {
                toXML.Append(line.toXml());
            }

            toXML.Append("</BillAdd>");
            toXML.Append("</BillAddRq>");
            toXML.Append("</QBXMLMsgsRq>");
            toXML.Append("</QBXML>");


            return(toXML.ToString());
        }
Ejemplo n.º 26
0
 public override string ToString()
 {
     return(DueDate.ToString("dd/MM/yyyy")
            + " - $ "
            + Quota.ToString("f2", CultureInfo.InvariantCulture));
 }
Ejemplo n.º 27
0
 public override string ToString()
 {
     return($"{DueDate.ToString("dd/MM/yyyy")} - {Amount.ToString("F2", CultureInfo.InvariantCulture)}");
 }
Ejemplo n.º 28
0
 public override string ToString()
 {
     return(DueDate.ToString("dd/MM/yyyy")
            + " - "
            + Amount.ToString("F2"));
 }
Ejemplo n.º 29
0
        public void Register()
        {
            string data = string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13}", Id, OrderTicketNumber,
                                        Customer, Title, Description, Category, TotalAmount.ToString(), TotalPrePaid.ToString(),
                                        PrePaidTicketNumber.ToString(), DateTime.Now.ToString(), TotalDue.ToString(), CurrencyType.ToString(), ImageName, DueDate.ToString())
                          + Environment.NewLine;

            File.AppendAllText(DbPath, data);
        }
Ejemplo n.º 30
0
 public override string ToString()
 {
     return(DueDate.ToString("dd/MM/yyyy") + " - " + Amount.ToString("C2", CultureInfo.CurrentCulture));
 }