/// <summary> /// GetObjectVO /// </summary> /// <param name="pintFreightMasterID"></param> /// <returns></returns> /// <author>Trada</author> /// <date>Tuesday, Feb 28 2006</date> public DataTable GetFreightMaster(int pintFreightMasterID) { DataTable dtbReturn = new DataTable(); cst_FreightMasterDS dsFreightMaster = new cst_FreightMasterDS(); dtbReturn = dsFreightMaster.ListMasterByID(pintFreightMasterID); return(dtbReturn); }
/// <summary> /// GetPOReceiveDetail /// </summary> /// <param name="pintPOReceiveMasterID"></param> /// <returns></returns> /// <author>Trada</author> /// <date>Friday, Feb 24 2006</date> public DataSet GetPOReceiveDetail(int pintPOReceiveMasterID) { DataSet dstPOReceiveDetail = new DataSet(); cst_FreightMasterDS dsFreightMaster = new cst_FreightMasterDS(); dstPOReceiveDetail = dsFreightMaster.GetPOReceive(pintPOReceiveMasterID); foreach (DataRow drow in dstPOReceiveDetail.Tables[0].Rows) { drow[IV_AdjustmentTable.ADJUSTMENTID_FLD] = DBNull.Value; } return(dstPOReceiveDetail); }
/// <summary> /// DeleteMasterAndDetail /// </summary> /// <param name="pintMasterID"></param> /// <author>Trada</author> /// <date>Tuesday, Feb 28 2006</date> public void DeleteMasterAndDetail(int pintMasterID, DataSet pdstDetail) { foreach (DataRow drow in pdstDetail.Tables[0].Rows) { if (drow.RowState != DataRowState.Deleted) { drow.Delete(); } } cst_FreightDetailDS dsFreightDetail = new cst_FreightDetailDS(); dsFreightDetail.UpdateDataSet(pdstDetail); cst_FreightMasterDS dsFreightMaster = new cst_FreightMasterDS(); dsFreightMaster.Delete(pintMasterID); }
/// <summary> /// AddAndReturnID /// </summary> /// <param name="pobjMasterVO"></param> /// <param name="pdstDetail"></param> /// <returns></returns> /// <author>Trada</author> /// <date>Monday, Feb 27 2006</date> public int AddAndReturnID(cst_FreightMasterVO pobjMasterVO, DataSet pdstDetail) { int intMasterID = 0; cst_FreightMasterDS dscst_FreightMaster = new cst_FreightMasterDS(); intMasterID = dscst_FreightMaster.AddAndReturnID(pobjMasterVO); //save detail foreach (DataRow drow in pdstDetail.Tables[0].Rows) { if (drow.RowState == DataRowState.Deleted) { continue; } drow[cst_FreightDetailTable.FREIGHTMASTERID_FLD] = intMasterID; } cst_FreightDetailDS dscst_FreightDetail = new cst_FreightDetailDS(); //Update dataset dscst_FreightDetail.UpdateDataSet(pdstDetail); return(intMasterID); }
/// <summary> /// UpdateMasterAndDetail /// </summary> /// <param name="pobjMasterVO"></param> /// <param name="pdstDetail"></param> /// <author>Trada</author> /// <date>Tuesday, Feb 28 2006</date> public void UpdateMasterAndDetail(cst_FreightMasterVO pobjMasterVO, DataSet pdstDetail) { cst_FreightMasterDS dsFreightMaster = new cst_FreightMasterDS(); cst_FreightDetailDS dsFreightDetail = new cst_FreightDetailDS(); if (pobjMasterVO.FreightMasterID > 0) { foreach (DataRow drow in pdstDetail.Tables[0].Rows) { if (drow.RowState == DataRowState.Deleted) { continue; } if (int.Parse(drow[cst_FreightMasterTable.FREIGHTMASTERID_FLD].ToString()) == 0) { drow[cst_FreightMasterTable.FREIGHTMASTERID_FLD] = pobjMasterVO.FreightMasterID; } } } //Update master dsFreightMaster.Update(pobjMasterVO); //Update Detail dsFreightDetail.UpdateDataSet(pdstDetail); }
/// <summary> /// GetInvoice_PONumber /// </summary> /// <param name="pintReturnToVendorMasterID"></param> /// <returns></returns> /// <author>TRada</author> /// <date>Thursday, July 6 2006</date> public DataSet GetInvoice_PONumber(int pintReturnToVendorMasterID) { cst_FreightMasterDS dsFreightMaster = new cst_FreightMasterDS(); return(dsFreightMaster.GetInvoice_PONumber(pintReturnToVendorMasterID)); }