public bool Run(Behavious behv, bool flag_close) { bool flag_success = true; try { ConnectOpen(); IsReaderClose(); if (behv == Behavious.INSERT_OR_UPDATE_OR_DELETE) { InsertOrUpdateOrDelete(sql); } else if (behv == Behavious.SELECT_WITH_MUTIPARAM) { SelectWithMutiParam(sql); } else if (behv == Behavious.SELECT_WITH_SINGLEPARAM) { SelectWirhSingleParam(sql); } else if (behv == Behavious.SELECT_WITHOUT_PARAM) { SelectWithOutParam(sql); } else if (behv == Behavious.DELETE_SINGLE) { DeleteWirhSingleParam(sql); } else { flag_success = false; } } catch (System.Exception ex) { flag_success = false; } if (flag_close) { CloseConnect(); } return(flag_success); }
public bool Run(Behavious behv,bool flag_close) { bool flag_success = true; try { ConnectOpen(); IsReaderClose(); if (behv == Behavious.INSERT_OR_UPDATE_OR_DELETE) { InsertOrUpdateOrDelete(sql); } else if (behv == Behavious.SELECT_WITH_MUTIPARAM) { SelectWithMutiParam(sql); } else if (behv == Behavious.SELECT_WITH_SINGLEPARAM) { SelectWirhSingleParam(sql); } else if (behv == Behavious.SELECT_WITHOUT_PARAM) { SelectWithOutParam(sql); } else if (behv == Behavious.DELETE_SINGLE) { DeleteWirhSingleParam(sql); } else { flag_success = false; } } catch (System.Exception ex) { flag_success = false; } if (flag_close) { CloseConnect(); } return flag_success; }