public bool Insert() { try { //clsoperation objTrans = new clsoperation(); // QueryBuilder objQB = new QueryBuilder(); objTrans.Start_Transaction(); // objdbhims.Query = objQB.QBGetMax("GroupId", TableName); // this._GroupId = objTrans.DataTrigger_Get_Max(objdbhims); //if (!this._GroupId.Equals("True")) //{ objdbhims.Query = objQB.QBInsert(MakeArray(), TableName); this.StrErrorMessage = objTrans.DataTrigger_Insert(objdbhims); objTrans.End_Transaction(); if (this.StrErrorMessage.Equals("True")) { this.StrErrorMessage = objTrans.OperationError; return(false); } return(true); // } } catch (Exception e) { this.StrErrorMessage = e.Message; return(false); } }
public bool Deleteolddata() { clsoperation objTrans = new clsoperation(); QueryBuilder objQB = new QueryBuilder(); objTrans.Start_Transaction(); objdbhims.Query = "Delete from mi_tresult where enteredon<date_sub(Now(), Interval 4 day)";// Will delete 4 days old data this.StrErrorMessage = objTrans.DataTrigger_Delete(objdbhims); if (StrErrorMessage.Equals("True")) { objTrans.End_Transaction(); this.StrErrorMessage = objTrans.OperationError; return(false); } objTrans.End_Transaction(); return(true); }
public bool Update() { // clsoperation objTrans = new clsoperation(); // QueryBuilder objQB = new QueryBuilder(); objTrans.Start_Transaction(); objdbhims.Query = objQB.QBUpdate(MakeArray(), TableName); this.StrErrorMessage = objTrans.DataTrigger_Update(objdbhims); objTrans.End_Transaction(); if (this.StrErrorMessage.Equals("True")) { this.StrErrorMessage = objTrans.OperationError; return(false); } else { return(true); } }