Example #1
0
    private void CreateXMLFile() {
      XmlBill facturaXml = XmlBill.Parse(this);
      this.xml = facturaXml.CreateDocument();
      this.xml.Save(this.GetXmlFileNameFull());

      if (this.IssuedTime.Year >= 2014) {
        this.stamp = BillStamper.Stamp(this);
        this.hasStamp = true;
        this.xml = this.stamp.GetXmlDocument();
      }
      this.xml.Save(this.GetXmlFileNameFull());
    }
Example #2
0
 protected override void OnLoadObjectData(DataRow row) {
   this.billType = (BillType) Convert.ToChar(row["BillType"]);
   this.supplyOrderId = (int) row["OrderId"];
   this.issuedBy = Contact.Parse((int) row["IssuedById"]);
   this.issuedTime = (DateTime) row["IssuedTime"];
   this.certificateNumber = (string) row["CertificateNumber"];
   this.serialNumber = (string) row["BillSerialNumber"];
   this.number = (string) row["BillNumber"];
   this.approvalYear = (int) row["ApprovalYear"];
   this.approvalNumber = (string) row["ApprovalNumber"];
   this.digitalString = (string) row["DigitalString"];
   this.digitalSign = (string) row["DigitalSign"];
   if (((string) row["BillXMLVersion"]).Length != 0) {
     xml = new System.Xml.XmlDocument();
     xml.LoadXml((string) row["BillXMLVersion"]);
   }
   if (((string) row["BillStamp"]).Length != 0) {
     this.stamp = BillStamp.Parse((string) row["BillStamp"]);
     this.hasStamp = true;
   }
   this.canceledBy = Contact.Parse((int) row["CanceledById"]);
   this.cancelationTime = (DateTime) row["CancelationTime"];
   this.status = (BillStatus) Convert.ToChar(row["BillStatus"]);
 }