示例#1
0
        private void bbiMiText_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            string fPath;

            if (sfdText.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            fPath = sfdText.FileName;
            if (string.IsNullOrEmpty(fPath))
            {
                return;
            }
            var        miDt = GetPrintTable();
            TextWriter tw   = new StreamWriter(fPath, true);

            if (miDt.Rows.Count < 1)
            {
                return;
            }
            for (var i = 0; i < miDt.Rows.Count; i++)
            {
                var cSerial = String.Format(@"I*{0}*C*{1}*L*{2}",
                                            miDt.Rows[i]["cInvCode"], miDt.Rows[i]["cSerialNumber"], miDt.Rows[i]["cLotNo"]);
                tw.WriteLine("{0} {1}", cSerial, miDt.Rows[i]["cSerialNumber"]);
            }
            tw.Close();
            DllWmsMain.RecordPrintLog(_cGuid);
            MessageBox.Show(@"导出成功");
        }
示例#2
0
        private void PrinterDone()
        {
            var strDate = DllWmsMain.GetPrintLog(_cGuid);

            if (!string.IsNullOrEmpty(strDate))
            {
                MessageBox.Show(@"已经打印过,不允许再打印! 打印时间:" + strDate, @"提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            var dt = GetPrintTable();

            if (dt.Rows.Count < 1)
            {
                return;
            }
            short iCopies = 1;

            if (beiCopies.EditValue == null)
            {
                iCopies = 1;
            }
            else if (!short.TryParse(beiCopies.EditValue.ToString(), out iCopies))
            {
                iCopies = 1;
            }
            DllWorkPrintLabel.Copies = iCopies;
            DllWorkPrintLabel.ProBoxPrintCodeSoft(dt, iCopies, _cTempletPath, _cPrinter);
        }
示例#3
0
        private void PrinterDone()
        {
            var strDate = DllWmsMain.GetPrintLog(_cGuid);

            if (!string.IsNullOrEmpty(strDate))
            {
                MessageBox.Show(@"已经打印过,不允许再打印! 打印时间:" + strDate, @"提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            var dt = GetPrintTable();

            DllWorkPrintLabel.ProPrintCodeSoft(dt, _cTempletFileName, _cPrinter);
        }
示例#4
0
 private void biEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (!string.IsNullOrEmpty(lblTitleMain.lblAutoID.Text))
     {
         var strDate = DllWmsMain.GetPrintLog(_cGuid);
         if (!string.IsNullOrEmpty(strDate))
         {
             MessageBox.Show(@"已经打印过,不允许修改! 打印时间:" + strDate, @"提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         SetControlEnable();//启用所有输入框和保存按钮
     }
     else
     {
         MessageBox.Show(@"未指定单据,请检查后再试!", @"提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
示例#5
0
        private void uExplorerBar_ItemClick(object sender, ItemEventArgs e)
        {
            var cClass = DllWmsMain.GetMenuClass(e.Item.Key);

            if (string.IsNullOrEmpty(cClass))
            {
                return;
            }
            var f = ExistForm(e.Item.Key);

            if (f == null)
            {
                MenuDoubleClick(cClass);
            }
            else
            {
                f.Activate();
            }
        }
示例#6
0
        private void tsbtnUpdate_Click(object sender, EventArgs e)
        {
            if (txtcInvCode.Value == null || string.IsNullOrEmpty(txtcInvCode.Value.ToString()))
            {
                MessageBox.Show(@"产品编码必输");
                return;
            }
            if (!WmsFunction.IsNumAndEnCh(tstxtLotNo.Text))
            {
                MessageBox.Show(@"请输入正确的批次格式,只允许有数字与字母");
                return;
            }
            var cmd = new SqlCommand("update Bar_Product_Box_SerialNumber set cLotNo='" + tstxtLotNo.Text + "' where cSerialNumber in " +
                                     "(select cSerialNumber from View_Bar_Product_Box_SerialNumber where " + pageChange.WhereStr + ")");

            var wf = new WmsFunction(BaseStructure.WmsCon);

            wf.ExecSqlCmd(cmd);
            pageChange.GetRecord();
            DllWmsMain.RecordLogAction(@"周转箱更新批号", BaseStructure.LoginName + " 更新了" + pageChange.WhereStr + "范围的批号  " + tstxtLotNo.Text);
        }