private int InsertRecord() { int _retVal = -1; try { int _errorCode = (int)ErrorCodes.NoError; string _tblNM = DBStructure.TABLE_ASSET_MASTER; FieldNames[] _selFlds = new FieldNames[1]; _selFlds[0].FieldName = DBStructure.ASSET_MASTER_CODE; cndCheck[] _whCnd = new cndCheck[2]; _whCnd[0].FieldName = DBStructure.ASSET_MASTER_CODE; _whCnd[0].FieldType = Fieldtypes.Char; _whCnd[0].FirstFieldValue = AssetCode.ToString(); _whCnd[0].ArithmeticOp = ArithmeticOperator.EQUALS; _whCnd[0].LogicOp = LogicalOperator.AND; _whCnd[1].FieldName = DBStructure.ASSET_MASTER_ACCOUNT_ID; _whCnd[1].FieldType = Fieldtypes.Integer; _whCnd[1].FirstFieldValue = UserGroupID.ToString(); _whCnd[1].ArithmeticOp = ArithmeticOperator.EQUALS; DataSet _dsAsset = _dalAccess.Select(false, _tblNM, true, _selFlds, _whCnd, out _errorCode); if (_errorCode == (int)ErrorCodes.NoError) { if (_dsAsset.Tables[0].Rows.Count > 0) StatusDescription = GetGlobalResourceObject(ResorceFileName, "AssetExists").ToString(); else { RecordValues[] _newRec = new RecordValues[24]; _newRec[0].FieldName = DBStructure.ASSET_MASTER_CODE; _newRec[0].FieldType = Fieldtypes.VarChar; _newRec[0].FieldValue = AssetCode; _newRec[1].FieldName = DBStructure.ASSET_MASTER_NAME; _newRec[1].FieldType = Fieldtypes.VarChar; _newRec[1].FieldValue = AssetName; _newRec[2].FieldName = DBStructure.ASSET_MASTER_DESCRIPTION; _newRec[2].FieldType = Fieldtypes.VarChar; _newRec[2].FieldValue = AssetDesc; _newRec[16].FieldName = DBStructure.ASSET_MASTER_INSURANCE_DUE_DATE; _newRec[16].FieldType = Fieldtypes.Integer; _newRec[16].FieldValue = String.IsNullOrEmpty(InsuranceDueDate.ToString()) ? null : InsuranceDueDate.ToString(); _newRec[17].FieldName = DBStructure.ASSET_MASTER_FITNESS_CERTIFICATION_DUE_DATE; _newRec[17].FieldType = Fieldtypes.Integer; _newRec[17].FieldValue = String.IsNullOrEmpty(FitnessCertificationDueDate.ToString()) ? null : FitnessCertificationDueDate.ToString(); _newRec[18].FieldName = DBStructure.ASSET_MASTER_ROAD_TAX_DUE_DATE; _newRec[18].FieldType = Fieldtypes.Integer; _newRec[18].FieldValue = String.IsNullOrEmpty(RoadTaxDueDate.ToString()) ? null : RoadTaxDueDate.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)