📄 setcurrentinvnoform.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SPRFrame;
using Sybase.DataWindow;
namespace HPIResource.ShouFei
{
public partial class SetCurrentInvNoForm : Form
{
public CasherInvoice cInv = new CasherInvoice();
public int casherID ;
public string invType = "M";
public SetCurrentInvNoForm()
{
InitializeComponent();
}
private void RetrieveData()
{
cInv.SetDataByCurrent(casherID,invType);
cInv.Retrieve();
tb_CurrentNo.Text = cInv.CurrentN0.ToString();
}
private void btn_Cancel_Click(object sender, EventArgs e)
{
SPRF.PARM = "-1";
this.Close();
}
private void SetCurrentInvNoForm_Load(object sender, EventArgs e)
{
this.RetrieveData();
}
private void btn_Setup_Click(object sender, EventArgs e)
{
if (cInv.RowCount == 0)
{
cInv.InsertRow(0);
cInv.SetRow(1);
cInv.CasherID = casherID;
cInv.XH = 0;
cInv.InvType = invType;
cInv.CurrentN0 = Convert.ToInt32(tb_NewNo.Text);
}
else
{
cInv.SetRow(1);
cInv.CurrentN0 = Convert.ToInt32(tb_NewNo.Text);
}
try
{
cInv.UpdateData();
SPRF.SQLCA.Commit();
this.Close();
}
catch (DbErrorException ex)
{
SPRF.ErrText = ex.SqlErrorText;
SPRF.SQLCA.Rollback();
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -