public int Insert(Account entity) { OracleCommand command = (OracleCommand)Session.Connection.CreateCommand(); command.AppendText(string.Format("insert into {0}({1}) values ({2})", TableName, "Id,ResourceType,ResourceId,Level")); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.ID, Account.IDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.RESOURCETYPE, Account.RESOURCETYPEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.RESOURCEID, Account.RESOURCEIDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.LEVEL, Account.LEVELProperty)); return(Session.ExecuteNonQuery(command)); }
public int Insert(Metrics entity) { OracleCommand command = (OracleCommand)Session.Connection.CreateCommand(); command.AppendText(string.Format("insert into {0}({1}) values ({2})", TableName, "UserId,Consuption,TotalOrder,CreateTime")); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.USERID, Metrics.USERIDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.CONSUPTION, Metrics.CONSUPTIONProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.TOTALORDER, Metrics.TOTALORDERProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.CREATETIME, Metrics.CREATETIMEProperty)); return(Session.ExecuteNonQuery(command)); }
public int Insert(SystemTask entity) { OracleCommand command = (OracleCommand)Session.Connection.CreateCommand(); command.AppendText(string.Format("insert into {0}({1}) values ({2})", TableName, "Id,Name,MetricField,TargetValue,Type")); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.ID, SystemTask.IDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.NAME, SystemTask.NAMEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.METRICFIELD, SystemTask.METRICFIELDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.TARGETVALUE, SystemTask.TARGETVALUEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.TYPE, SystemTask.TYPEProperty)); return(Session.ExecuteNonQuery(command)); }
public int Insert(UserTask entity) { OracleCommand command = (OracleCommand)Session.Connection.CreateCommand(); command.AppendText(string.Format("insert into {0}({1}) values ({2})", TableName, "Id,Name,MetricField,TargetValue,Type,AccountId,CurrentValue,ProcessStatus")); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.ID, UserTask.IDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.NAME, UserTask.NAMEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.METRICFIELD, UserTask.METRICFIELDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.TARGETVALUE, UserTask.TARGETVALUEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.TYPE, UserTask.TYPEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.ACCOUNTID, UserTask.ACCOUNTIDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.CURRENTVALUE, UserTask.CURRENTVALUEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.PROCESSSTATUS, UserTask.PROCESSSTATUSProperty)); return(Session.ExecuteNonQuery(command)); }
public int Insert(BANKS entity) { OracleCommand command = (OracleCommand)Session.Connection.CreateCommand(); command.AppendText(string.Format("insert into {0}({1}) values ({2})", TableName, "URID,CODE,NAME,SYBANKID,DIRECTBANKCODE,DIRECTFLAG,DESCRIPTION,ISACTIVE,DISPLAYORDER,CREATEDON,CREATEDBY,LASTMODIFIEDON,LASTMODIFIEDBY,ROWVERSION")); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.URID, BANKS.URIDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.CODE, BANKS.CODEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.NAME, BANKS.NAMEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.SYBANKID, BANKS.SYBANKIDProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.DIRECTBANKCODE, BANKS.DIRECTBANKCODEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.DIRECTFLAG, BANKS.DIRECTFLAGProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.DESCRIPTION, BANKS.DESCRIPTIONProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.ISACTIVE, BANKS.ISACTIVEProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.DISPLAYORDER, BANKS.DISPLAYORDERProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.CREATEDON, BANKS.CREATEDONProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.CREATEDBY, BANKS.CREATEDBYProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.LASTMODIFIEDON, BANKS.LASTMODIFIEDONProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.LASTMODIFIEDBY, BANKS.LASTMODIFIEDBYProperty)); command.AppendText(", "); command.AppendParameter(Session.DBParameterGenerator.GetParameter(entity.ROWVERSION, BANKS.ROWVERSIONProperty)); return(Session.ExecuteNonQuery(command)); }