private void PrintTTLabels_OnPrintTTLabelSucceeded(object sender, PrintMUBAndTTLabelsEventArgs e) { var dalLabel = new DAL_Labels(); dalLabel.UpdatePrinting(e.LabelInfo.UserId, EnumLabelType.TT, EnumPrintStatus.Successful, EnumStation.DUTYOFFICER, DateTime.Today); DeleteQRCodeImageFileTemp(); }
private void PrintMUBLabels_OnPrintMUBLabelSucceeded(object sender, PrintMUBAndTTLabelsEventArgs e) { Trinity.BE.Label labelInfo = new Trinity.BE.Label { UserId = e.LabelInfo.UserId, Label_Type = EnumLabelType.MUB, CompanyName = e.LabelInfo.CompanyName, MarkingNo = e.LabelInfo.MarkingNo, DrugType = e.LabelInfo.DrugType, NRIC = e.LabelInfo.NRIC, Name = e.LabelInfo.Name, Date = DateTime.Now, QRCode = e.LabelInfo.QRCode, LastStation = EnumStation.DUTYOFFICER, PrintCount = e.LabelInfo.PrintCount, ReprintReason = e.LabelInfo.ReprintReason, PrintStatus = EnumPrintStatus.Successful }; // IsMUB = false: Print UB DAL_Labels dalLabel = new DAL_Labels(); if (!e.LabelInfo.IsMUB) { //labelInfo.Label_Type = EnumLabelType.UB; //labelInfo.DrugType = e.LabelInfo.DrugType; //if (dalLabel.UpdateLabel(labelInfo) != null) //{ // string message = "Print MUB for " + e.LabelInfo.Name + " successful."; // //MessageBox.Show(message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); //} } else { dalLabel.UpdatePrinting(e.LabelInfo.UserId, EnumLabelType.MUB, EnumPrintStatus.Successful, EnumStation.DUTYOFFICER, DateTime.Today); } DeleteQRCodeImageFileTemp(); }