本文整理汇总了C#中THOK.Util.PersistentManager类的典型用法代码示例。如果您正苦于以下问题:C# PersistentManager类的具体用法?C# PersistentManager怎么用?C# PersistentManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PersistentManager类属于THOK.Util命名空间,在下文中一共展示了PersistentManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMaster
public DataTable GetMaster(string billType)
{
using (PersistentManager pm = new PersistentManager())
{
return palletDao.FindMaster(billType);
}
}
示例2: AddBill
public void AddBill(DataRow masterRow, string userID, DataTable detailTable)
{
using (PersistentManager pm = new PersistentManager())
{
try
{
pm.BeginTransaction();
string billNo = palletDao.FindNewBillNo(masterRow["BILLDATE"].ToString());
masterRow["BILLNO"] = billNo;
//���뵥������
palletDao.InsertMaster(masterRow, userID);
//���뵥����ϸ��
palletDao.InsertDetail(billNo, detailTable);
pm.Commit();
}
catch (Exception e)
{
pm.Rollback();
throw new Exception(e.Message);
}
}
}
示例3: GetDetail
public DataTable GetDetail(string billNo)
{
using (PersistentManager pm = new PersistentManager())
{
return palletDao.FindDetail(billNo);
}
}
示例4: GetInBill
/// <summary>
/// �������������������
/// </summary>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <returns></returns>
public bool GetInBill(string startDate, string endDate, string EmployeeCode,string wareCode,string billtype, out string errorInfo)
{
bool tag = false;
Employee = EmployeeCode;
errorInfo = string.Empty;
using (PersistentManager pm = new PersistentManager())
{
DownInBillDao dao = new DownInBillDao();
DataTable emply = dao.FindEmployee(EmployeeCode);
DataTable inMasterBillNo = this.GetInBillNo();
string billnolist = UtinString.StringMake(inMasterBillNo, "bill_no");
billnolist = UtinString.StringMake(billnolist);
billnolist = string.Format("ORDER_DATE >='{0}' AND ORDER_DATE <='{1}' AND ORDER_ID NOT IN({2})", startDate, endDate, billnolist);
DataTable masterdt = this.InBillMaster(billnolist);
string inDetailList = UtinString.StringMake(masterdt, "ORDER_ID");
inDetailList = UtinString.StringMake(inDetailList);
inDetailList = "ORDER_ID IN(" + inDetailList + ")";
DataTable detaildt = this.InBillDetail(inDetailList);
if (masterdt.Rows.Count > 0 && detaildt.Rows.Count > 0)
{
DataSet masterds = this.InBillMaster(masterdt, emply.Rows[0]["employee_id"].ToString(), wareCode, billtype);
DataSet detailds = this.InBillDetail(detaildt);
this.Insert(masterds, detailds);
tag = true;
}
else
errorInfo = "û���µ���ⵥ���أ�";
}
return tag;
}
示例5: AddMix
public int AddMix(string billNo, DataRow newRow)
{
int result = 1;
using (PersistentManager pm = new PersistentManager())
{
ProductStateDao psDao = new ProductStateDao();
try
{
pm.BeginTransaction();
result = psDao.UpdateMix(billNo, newRow["MIXID"].ToString(), Convert.ToDouble(newRow["QUANTITY"]));
if (result != 1)
throw new Exception("����������Ϊ1");
result = psDao.UpdateMixID(billNo, newRow["PRODUCTCODE"].ToString(), newRow["ITEMNO"].ToString(), newRow["MIXID"].ToString());
if (result != 1)
throw new Exception("����������Ϊ1");
pm.Commit();
}
catch
{
pm.Rollback();
}
}
return result;
}
示例6: AddBill3
public void AddBill3(DataRow masterRow, DataTable detailTable)
{
using (PersistentManager pm = new PersistentManager())
{
try
{
BillDao billDao = new BillDao();
ProductStateDao stateDao = new ProductStateDao();
pm.BeginTransaction();
string billNo = billDao.FindNewBillNo("P", masterRow["BILLDATE"].ToString());
masterRow["BILLNO"] = billNo;
//���뵥������
billDao.InsertMaster(masterRow);
stateDao.Insert(billNo, detailTable);
pm.Commit();
}
catch (Exception e)
{
pm.Rollback();
throw new Exception(e.Message);
}
}
}
示例7: GetSortingOrderDate
//选择时间下载分拣数据
public bool GetSortingOrderDate(string startDate, string endDate,string sortingLine,string batch, out string errorInfo)
{
bool tag = false;
errorInfo = string.Empty;
using (PersistentManager dbpm = new PersistentManager())
{
DownSortingInfoDao dao = new DownSortingInfoDao();
try
{
string sort = string.Empty;
if (sortingLine != string.Empty || sortingLine != null)
{
sort = " AND SORTINGLINECODE='" + sortingLine + "' AND BATCHID='" + batch + "'";
}
//查询仓库7天内的订单号
DataTable orderdt = this.GetOrderId(startDate, endDate);
string orderlist = UtinString.MakeString(orderdt, "order_id");
string orderlistDate = "ORDERDATE >='" + startDate + "' AND ORDERDATE <='" + endDate + "'" + sort;
DataTable masterdt = this.GetSortingOrder(orderlistDate);
DataRow[] masterdr = masterdt.Select("ORDERID NOT IN(" + orderlist + ")");
string ordermasterlist = UtinString.MakeString(masterdr, "OrderID");
ordermasterlist = "OrderID IN (" + ordermasterlist + ")";
DataTable detaildt = this.GetSortingOrderDetail(ordermasterlist);
if (masterdr.Count() > 0 && detaildt.Rows.Count > 0)
{
DataSet masterds = this.SaveSortingOrder(masterdr);
DataSet detailds = this.SaveSortingOrderDetail(detaildt);
this.Insert(masterds, detailds);
//上报分拣订单
//upload.uploadSort(masterds, detailds);
if (sort != string.Empty)
{
try
{
DataTable diapLine = this.GetDispatchLine(ordermasterlist);
DataSet dispDs = this.SaveDispatch(diapLine, sortingLine);
this.Insert(dispDs);
tag = true;
}
catch (Exception e)
{
errorInfo = "调度出错,请手动进行线路调度,出错原因:" + e.Message;
}
}
else
errorInfo = "没有选择分拣线!下载完成后,请手动进行线路调度!";
//tag = true;
}
else
errorInfo = "没有可用的数据下载!";
}
catch (Exception e)
{
errorInfo = "下载错误:" + e.Message;
}
}
return tag;
}
示例8: SaveCigarette
internal void SaveCigarette(string cigaretteCode, string classSymbol,string cigaretteName)
{
using (PersistentManager pm = new PersistentManager())
{
cigaretteDao.Update(cigaretteCode,classSymbol, cigaretteName);
}
}
示例9: DeleteCigarette
internal void DeleteCigarette(string cigaretteCode)
{
using (PersistentManager pm = new PersistentManager())
{
cigaretteDao.Delete(cigaretteCode);
}
}
示例10: GetAll
public DataTable GetAll()
{
using (PersistentManager pm = new PersistentManager())
{
return cigaretteDao.Find();
}
}
示例11: CancelTask
public void CancelTask(string billNo)
{
using (PersistentManager pm = new PersistentManager())
{
TaskDao taskDao = new TaskDao();
BillDao billDao = new BillDao();
CellDao cellDao = new CellDao();
try
{
pm.BeginTransaction();
int count = taskDao.FindExecutingTask(billNo);
if (count != 0)
throw new Exception("����δִ�л�ִ���е���ҵ��");
if (cellDao.Update(billNo) > 0)
{
taskDao.Backup(billNo);
taskDao.Delete(billNo);
billDao.UpdateMasterState(billNo, "6");//����Ϊȡ��
}
else
throw new Exception("�õ���ȫ����ҵ�����");
pm.Commit();
}
catch (Exception e)
{
pm.Rollback();
throw new Exception(e.Message);
}
}
}
示例12: CancelTaskIn
public void CancelTaskIn(string billNo)
{
using (PersistentManager pm = new PersistentManager())
{
TaskDao taskDao = new TaskDao();
BillDao billDao = new BillDao();
CellDao cellDao = new CellDao();
ScheduleDao scheduleDao = new ScheduleDao();
ProductStateDao productStateDao = new ProductStateDao();
try
{
pm.BeginTransaction();
int count = taskDao.FindExecutingTask(billNo);
if (count != 0)
throw new Exception("����δִ�л�ִ���е���ҵ��");
taskDao.Backup(billNo);
taskDao.Delete(billNo);
billDao.UpdateMasterState(billNo, "6");//����Ϊȡ��
productStateDao.Delete(billNo);
//�������ⵥ���̰����������������ƻ�ISOUTΪ�����
scheduleDao.UpdateIsIn(billNo);
pm.Commit();
}
catch (Exception e)
{
pm.Rollback();
throw new Exception(e.Message);
}
}
}
示例13: DeleteFormula
public void DeleteFormula(string formulaCode)
{
using (PersistentManager pm = new PersistentManager())
{
FormulaDao formulaDao = new FormulaDao();
ScheduleDao scheduleDao = new ScheduleDao();
try
{
pm.BeginTransaction();
if (scheduleDao.Find(formulaCode) == 0)
{
formulaDao.DeleteDetail(formulaCode);
formulaDao.DeleteMaster(formulaCode);
}
else
throw new Exception("��ǰ�䷽�����������ƻ��Ѱ�");
pm.Commit();
}
catch (Exception e)
{
pm.Rollback();
throw new Exception(e.Message);
}
}
}
示例14: AddCigarette
public void AddCigarette(string cigaretteCode,string classSymbol, string cigaretteName)
{
using (PersistentManager pm = new PersistentManager())
{
cigaretteDao.Insert(cigaretteCode,classSymbol, cigaretteName);
}
}
示例15: SaveArea
public void SaveArea(DataRow row)
{
using (PersistentManager pm = new PersistentManager())
{
AreaDao areaDao = new AreaDao();
areaDao.Update(row);
}
}