예제 #1
0
        public WritHistoryBE GetWritHistory()
        {
            if (myWritHistory == null)
            {
                myWritHistory = new WritHistoryBE(this);
            }

            return(myWritHistory);
        }
예제 #2
0
        protected override void BeforeUpdate(DataRow row)
        {
            CLAS.WritRow dr = (CLAS.WritRow)row;

            this.BeforeChange(dr.Table.Columns["OfficeID"], dr);
            this.BeforeChange(dr.Table.Columns["IssueRenewalDate"], dr);
            this.BeforeChange(dr.Table.Columns["ExecutionorRegistrationNumber"], dr);

            if (!bEditOnly && dr.HasVersion(DataRowVersion.Original))
            {
                WritHistoryBE       wh  = this.myA.GetWritHistory();
                CLAS.WritHistoryRow whr = (CLAS.WritHistoryRow)wh.Add(row);

                whr.BeginEdit();
                whr.FileID           = dr.FileID;
                whr.ExpiryDate       = Convert.ToDateTime(dr["ExpiryDate", DataRowVersion.Original]);
                whr.IssueRenewalDate = Convert.ToDateTime(dr["IssueRenewalDate", DataRowVersion.Original]);
                whr.OfficeID         = Convert.ToInt32(dr["OfficeID", DataRowVersion.Original]);
                whr.EndEdit();
            }

            //		Public Sub Save(Optional bEditOnly As Boolean)
            //    On Error GoTo Error_Trap
            //
            //    Dim nErrNum As Long
            //    Dim sErrDesc As String
            //    Dim bWHGen As Boolean
            //
            //    With moDataMan
            //        If mbDirty Then
            //            Validate csAgentID
            //            Validate csIssueRenewalDate
            //            Validate csExecutionorRegistrationNumber
            //
            //            .BeginTrans
            //
            //            If Not bEditOnly Then
            //                bWHGen = CAGen()
            //            End If
            //
            //            .UpdateRecord mrst
            //            UpdateXMLToc
            //
            //            If bWHGen Then
            //                WHGen
            //            End If
            //            WHValuesCache
            //
            //            .CommitTrans
            //        Else
            //            If Not (mrst.EOF Or mrst.BOF) Then mrst.CancelUpdate
            //        End If
            //    End With
            //
            //    mbDirty = False
            //
            //    Exit Sub
            //
            //Error_Trap:
            //    nErrNum = Err.Number
            //    sErrDesc = Err.Description
            //    GetCLASMate(Me).ErrMessage = Err.Description
            //    moDataMan.RollbackTrans
            //    Select Case nErrNum
            //        Case secInvalidDataType
            //            Err.Raise secInvalidDataType, csObjectName & csSave, sErrDesc
            //        Case Else
            //            Err.Raise nErrNum, csObjectName & csSave, sErrDesc
            //    End Select
            //
            //End Sub
        }