private void UpdateWorkingPlace(string id, string workingPlaceID, string JobContent, string Comment) { BD_WorkingWorkedInfoData data = new BD_WorkingWorkedInfoData(); ITransaction tran = factory.GetLoadObject(data, Func.ParseString(id)); Execute(tran); if (!HasError) { //Get Data data = (BD_WorkingWorkedInfoData)tran.Result; data.WorkingPlaceId = workingPlaceID; data.JobContent = JobContent; data.Comment = Comment; tran = factory.GetUpdateObject(data); Execute(tran); if (!HasError) { OperationLogger.WriteInfo(Constants.LogOperationAlbumId, Constants.LogActionUpdateId, updateSuccess, Page.User.Identity.Name); mvMessage.SetCompleteMessage(updateSuccess); } else { OperationLogger.WriteError(Constants.LogOperationAlbumId, Constants.LogActionUpdateId, updateUnSuccess, Page.User.Identity.Name); mvMessage.AddError(updateUnSuccess); } ShowData(); } }
private void Delete(string id) { BD_WorkingWorkedInfoData data = new BD_WorkingWorkedInfoData(); ITransaction tran = factory.GetLoadObject(data, Func.ParseString(id)); Execute(tran); if (!HasError) { //Get Data data = (BD_WorkingWorkedInfoData)tran.Result; data.DelFlag = "1"; tran = factory.GetUpdateObject(data); Execute(tran); if (!HasError) { OperationLogger.WriteInfo(Constants.LogOperationAlbumId, Constants.LogActionUpdateId, deleteSuccess, Page.User.Identity.Name); mvMessage.SetCompleteMessage(deleteSuccess); } else { OperationLogger.WriteError(Constants.LogOperationAlbumId, Constants.LogActionUpdateId, deleteUnSuccess, Page.User.Identity.Name); mvMessage.AddError(deleteUnSuccess); } ShowData(); } }